hive-intelligence 1.1.3 → 1.3.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 (174) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +315 -85
  3. package/agent-skills/.claude-plugin/plugin.json +10 -4
  4. package/agent-skills/.mcp.json +8 -0
  5. package/agent-skills/AGENTS.md +37 -0
  6. package/agent-skills/README.md +28 -23
  7. package/agent-skills/SKILL.md +40 -10
  8. package/agent-skills/evals/trigger-queries.json +270 -0
  9. package/agent-skills/package.json +4 -4
  10. package/agent-skills/packs/hive-build/SKILL.md +54 -25
  11. package/agent-skills/packs/hive-build/evals/evals.json +16 -3
  12. package/agent-skills/packs/hive-build/evals/triggers.json +50 -0
  13. package/agent-skills/packs/hive-build-onboarding/SKILL.md +27 -34
  14. package/agent-skills/packs/hive-build-onboarding/evals/evals.json +1 -1
  15. package/agent-skills/packs/hive-build-onboarding/evals/triggers.json +50 -0
  16. package/agent-skills/packs/hive-cli/SKILL.md +33 -35
  17. package/agent-skills/packs/hive-cli/evals/evals.json +1 -1
  18. package/agent-skills/packs/hive-cli/evals/triggers.json +50 -0
  19. package/agent-skills/packs/hive-defi-research/SKILL.md +105 -19
  20. package/agent-skills/packs/hive-defi-research/evals/evals.json +6 -3
  21. package/agent-skills/packs/hive-defi-research/evals/triggers.json +50 -0
  22. package/agent-skills/packs/hive-dex-pool-analysis/SKILL.md +106 -16
  23. package/agent-skills/packs/hive-dex-pool-analysis/evals/evals.json +5 -3
  24. package/agent-skills/packs/hive-dex-pool-analysis/evals/triggers.json +50 -0
  25. package/agent-skills/packs/hive-market-research/SKILL.md +130 -21
  26. package/agent-skills/packs/hive-market-research/evals/evals.json +15 -2
  27. package/agent-skills/packs/hive-market-research/evals/triggers.json +50 -0
  28. package/agent-skills/packs/hive-mcp/SKILL.md +98 -153
  29. package/agent-skills/packs/hive-mcp/evals/evals.json +4 -3
  30. package/agent-skills/packs/hive-mcp/evals/triggers.json +50 -0
  31. package/agent-skills/packs/hive-mcp/references/client-install-matrix.md +62 -35
  32. package/agent-skills/packs/hive-mcp/references/clients.md +154 -0
  33. package/agent-skills/packs/hive-network-infrastructure/SKILL.md +105 -20
  34. package/agent-skills/packs/hive-network-infrastructure/evals/evals.json +4 -2
  35. package/agent-skills/packs/hive-network-infrastructure/evals/triggers.json +50 -0
  36. package/agent-skills/packs/hive-nft-research/SKILL.md +105 -18
  37. package/agent-skills/packs/hive-nft-research/evals/evals.json +4 -2
  38. package/agent-skills/packs/hive-nft-research/evals/triggers.json +50 -0
  39. package/agent-skills/packs/hive-prediction-markets/SKILL.md +108 -21
  40. package/agent-skills/packs/hive-prediction-markets/evals/evals.json +4 -2
  41. package/agent-skills/packs/hive-prediction-markets/evals/triggers.json +50 -0
  42. package/agent-skills/packs/hive-query/SKILL.md +80 -33
  43. package/agent-skills/packs/hive-query/evals/evals.json +7 -5
  44. package/agent-skills/packs/hive-query/evals/triggers.json +50 -0
  45. package/agent-skills/packs/hive-query/references/root-mcp-workflow.md +39 -18
  46. package/agent-skills/packs/hive-security-risk/SKILL.md +110 -19
  47. package/agent-skills/packs/hive-security-risk/evals/evals.json +4 -2
  48. package/agent-skills/packs/hive-security-risk/evals/triggers.json +50 -0
  49. package/agent-skills/packs/hive-solana-analysis/SKILL.md +115 -19
  50. package/agent-skills/packs/hive-solana-analysis/evals/evals.json +4 -2
  51. package/agent-skills/packs/hive-solana-analysis/evals/triggers.json +50 -0
  52. package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +120 -0
  53. package/agent-skills/packs/hive-stateful-monitoring/evals/evals.json +54 -0
  54. package/agent-skills/packs/hive-stateful-monitoring/evals/triggers.json +50 -0
  55. package/agent-skills/packs/hive-stateful-monitoring/references/b2b-subject-context.md +53 -0
  56. package/agent-skills/packs/hive-token-diligence/SKILL.md +119 -21
  57. package/agent-skills/packs/hive-token-diligence/evals/evals.json +6 -4
  58. package/agent-skills/packs/hive-token-diligence/evals/triggers.json +50 -0
  59. package/agent-skills/packs/hive-tool-discovery/SKILL.md +48 -19
  60. package/agent-skills/packs/hive-tool-discovery/evals/evals.json +17 -3
  61. package/agent-skills/packs/hive-tool-discovery/evals/triggers.json +50 -0
  62. package/agent-skills/packs/hive-tool-discovery/references/discovery-surfaces.md +31 -6
  63. package/agent-skills/packs/hive-wallet-investigation/SKILL.md +111 -18
  64. package/agent-skills/packs/hive-wallet-investigation/evals/evals.json +5 -3
  65. package/agent-skills/packs/hive-wallet-investigation/evals/triggers.json +50 -0
  66. package/agent-skills/references/agents-routing.md +19 -7
  67. package/agent-skills/scripts/validate-agent-skills-package.mjs +116 -18
  68. package/agent-skills/skills.sh.json +3 -2
  69. package/bin/hive-mcp.js +5 -5
  70. package/build/{alias-CZ3DEYHF.js → alias-BKAVOYQV.js} +2 -3
  71. package/build/{api-client-I23XLSHU.js → api-client-FTVDFW5V.js} +4 -4
  72. package/build/{auth-KKINNBXT.js → auth-EZFJ5RYB.js} +3 -4
  73. package/build/{browser-auth-EEFGRHWY.js → browser-auth-OJSUNFBI.js} +2 -3
  74. package/build/{cache-EGNMENNA.js → cache-TBDQ7QBU.js} +2 -3
  75. package/build/{chunk-V77LO4RO.js → chunk-6PC3HUAK.js} +10 -4
  76. package/build/{chunk-XYBEFFZ3.js → chunk-725R3KLJ.js} +26 -4
  77. package/build/{chunk-PGBVNMNZ.js → chunk-7GD2MFYI.js} +57 -7
  78. package/build/{chunk-IDZD2NVG.js → chunk-AEU43ACS.js} +33 -10
  79. package/build/chunk-EPF36Q3Z.js +71 -0
  80. package/build/chunk-I5Z6FZRL.js +178 -0
  81. package/build/{chunk-KBVPIZS4.js → chunk-ILVPOLA7.js} +12 -4
  82. package/build/{chunk-B6G222LS.js → chunk-L326MQZP.js} +22 -6
  83. package/build/{chunk-QNCI4DEB.js → chunk-M6REON2I.js} +35 -21
  84. package/build/chunk-N32UIHBU.js +125 -0
  85. package/build/{chunk-IZTN7WFH.js → chunk-Q7VBYLX7.js} +12 -3
  86. package/build/chunk-QDZ7MAVN.js +447 -0
  87. package/build/{chunk-KGYBTXIN.js → chunk-R6YZTFQL.js} +2 -1
  88. package/build/{chunk-DYJBTKNR.js → chunk-RU6QOFHH.js} +9 -10
  89. package/build/{chunk-RKICZ6DZ.js → chunk-RUHO24SX.js} +16 -10
  90. package/build/{chunk-MPIUUE3T.js → chunk-TNQ7GJ6Q.js} +0 -60
  91. package/build/{chunk-2X3U4DFK.js → chunk-W2QL7LYI.js} +43586 -21498
  92. package/build/chunk-ZXKFJQDE.js +20 -0
  93. package/build/cli.js +3342 -3410
  94. package/build/{completion-BELZL7ND.js → completion-7KBW243H.js} +4 -5
  95. package/build/{config-TDX4VUGW.js → config-KAEUX6RM.js} +23 -4
  96. package/build/{config-dir-V43W2WIA.js → config-dir-5IH7MOOT.js} +2 -3
  97. package/build/{doctor-5K5UWHNX.js → doctor-ORDOCGLM.js} +34 -10
  98. package/build/{errors-E6MVUBNA.js → errors-HGHUF575.js} +2 -3
  99. package/build/{format-TSFSI2K7.js → format-H7FOQSYY.js} +1 -2
  100. package/build/{init-YQ5NBICF.js → init-UCTCUYFA.js} +52 -9
  101. package/build/init-all-BVWW3JVK.js +408 -0
  102. package/build/mcpServer-RUEOTTF7.js +34 -0
  103. package/build/monitor-worker.js +1396 -0
  104. package/build/{namespace-PVHBFDW2.js → namespace-L5DGCY7K.js} +2 -3
  105. package/build/{open-YUIJP37F.js → open-V2RNA3QT.js} +2 -3
  106. package/build/{output-IYJBFCYK.js → output-ITGLBKIG.js} +2 -3
  107. package/build/release.json +8 -0
  108. package/build/{serve-KWNJK6EY.js → serve-DKLR2WQH.js} +9 -4
  109. package/build/server.js +5399 -2945
  110. package/build/{setup-YTUKMPNP.js → setup-PTYFMTK5.js} +60 -56
  111. package/build/stdio.js +10 -8
  112. package/build/{telemetry-5IPRKZBL.js → telemetry-HPLDYR7U.js} +5 -4
  113. package/build/{tools-PJHWFCAG.js → tools-I7GLWTV6.js} +15 -15
  114. package/build/{uninstall-HWXEIP6K.js → uninstall-SAOIPL6K.js} +19 -11
  115. package/build/update-check-IEXPOYYR.js +18 -0
  116. package/build/upgrade-J4HIGCKE.js +171 -0
  117. package/build/version-Z4HJL4VV.js +16 -0
  118. package/build/{watch-KZ5EDZK3.js → watch-WVR4CGCD.js} +8 -7
  119. package/package.json +82 -41
  120. package/agent-skills/packs/hive-defi-research/references/workflow.md +0 -41
  121. package/agent-skills/packs/hive-dex-pool-analysis/references/workflow.md +0 -42
  122. package/agent-skills/packs/hive-market-research/references/workflow.md +0 -47
  123. package/agent-skills/packs/hive-network-infrastructure/references/workflow.md +0 -41
  124. package/agent-skills/packs/hive-nft-research/references/workflow.md +0 -42
  125. package/agent-skills/packs/hive-prediction-markets/references/workflow.md +0 -42
  126. package/agent-skills/packs/hive-security-risk/references/workflow.md +0 -46
  127. package/agent-skills/packs/hive-solana-analysis/references/workflow.md +0 -42
  128. package/agent-skills/packs/hive-token-diligence/references/workflow.md +0 -45
  129. package/agent-skills/packs/hive-wallet-investigation/references/workflow.md +0 -45
  130. package/build/alias-CZ3DEYHF.js.map +0 -1
  131. package/build/api-client-I23XLSHU.js.map +0 -1
  132. package/build/auth-KKINNBXT.js.map +0 -1
  133. package/build/browser-auth-EEFGRHWY.js.map +0 -1
  134. package/build/cache-EGNMENNA.js.map +0 -1
  135. package/build/chunk-2MYMHMBF.js +0 -340
  136. package/build/chunk-2MYMHMBF.js.map +0 -1
  137. package/build/chunk-2X3U4DFK.js.map +0 -1
  138. package/build/chunk-B6G222LS.js.map +0 -1
  139. package/build/chunk-DYJBTKNR.js.map +0 -1
  140. package/build/chunk-IDZD2NVG.js.map +0 -1
  141. package/build/chunk-IZTN7WFH.js.map +0 -1
  142. package/build/chunk-KBVPIZS4.js.map +0 -1
  143. package/build/chunk-KGYBTXIN.js.map +0 -1
  144. package/build/chunk-MPIUUE3T.js.map +0 -1
  145. package/build/chunk-PGBVNMNZ.js.map +0 -1
  146. package/build/chunk-QNCI4DEB.js.map +0 -1
  147. package/build/chunk-RKICZ6DZ.js.map +0 -1
  148. package/build/chunk-UKHZIVDT.js +0 -44
  149. package/build/chunk-UKHZIVDT.js.map +0 -1
  150. package/build/chunk-V77LO4RO.js.map +0 -1
  151. package/build/chunk-XYBEFFZ3.js.map +0 -1
  152. package/build/cli.js.map +0 -1
  153. package/build/completion-BELZL7ND.js.map +0 -1
  154. package/build/config-TDX4VUGW.js.map +0 -1
  155. package/build/config-dir-V43W2WIA.js.map +0 -1
  156. package/build/doctor-5K5UWHNX.js.map +0 -1
  157. package/build/errors-E6MVUBNA.js.map +0 -1
  158. package/build/format-TSFSI2K7.js.map +0 -1
  159. package/build/init-YQ5NBICF.js.map +0 -1
  160. package/build/init-all-6OWEQALB.js +0 -274
  161. package/build/init-all-6OWEQALB.js.map +0 -1
  162. package/build/mcpServer-AEX3RQ4U.js +0 -20
  163. package/build/mcpServer-AEX3RQ4U.js.map +0 -1
  164. package/build/namespace-PVHBFDW2.js.map +0 -1
  165. package/build/open-YUIJP37F.js.map +0 -1
  166. package/build/output-IYJBFCYK.js.map +0 -1
  167. package/build/serve-KWNJK6EY.js.map +0 -1
  168. package/build/server.js.map +0 -1
  169. package/build/setup-YTUKMPNP.js.map +0 -1
  170. package/build/stdio.js.map +0 -1
  171. package/build/telemetry-5IPRKZBL.js.map +0 -1
  172. package/build/tools-PJHWFCAG.js.map +0 -1
  173. package/build/uninstall-HWXEIP6K.js.map +0 -1
  174. package/build/watch-KZ5EDZK3.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  NAMESPACE
4
- } from "./chunk-MPIUUE3T.js";
5
- import "./chunk-KBVPIZS4.js";
4
+ } from "./chunk-TNQ7GJ6Q.js";
5
+ import "./chunk-ILVPOLA7.js";
6
6
 
7
7
  // src/cli/completion.ts
8
8
  import {
@@ -72,7 +72,7 @@ _hive_completions() {
72
72
  case "$prev" in
73
73
  ${cases}
74
74
  tools) COMPREPLY=($(compgen -W "list search info call refresh" -- "$cur")); return ;;
75
- config) COMPREPLY=($(compgen -W "claude-desktop cursor vscode claude-code http" -- "$cur")); return ;;
75
+ config) COMPREPLY=($(compgen -W "claude-desktop cursor vscode claude-code codex grok http" -- "$cur")); return ;;
76
76
  auth) COMPREPLY=($(compgen -W "login logout whoami profiles switch" -- "$cur")); return ;;
77
77
  alias) COMPREPLY=($(compgen -W "set list remove" -- "$cur")); return ;;
78
78
  telemetry) COMPREPLY=($(compgen -W "enable disable status" -- "$cur")); return ;;
@@ -130,7 +130,7 @@ ${subcommandCases}
130
130
  ;;
131
131
  config)
132
132
  local -a subcmds
133
- subcmds=('claude-desktop:Claude Desktop config' 'cursor:Cursor config' 'vscode:VS Code config' 'claude-code:Claude Code config' 'http:HTTP remote config')
133
+ subcmds=('claude-desktop:Claude Desktop config' 'cursor:Cursor config' 'vscode:VS Code config' 'claude-code:Claude Code config' 'codex:Codex OAuth setup' 'grok:Grok connector setup' 'http:HTTP remote config')
134
134
  _describe 'subcommand' subcmds
135
135
  ;;
136
136
  auth)
@@ -276,4 +276,3 @@ export {
276
276
  generateCompletion,
277
277
  installCompletion
278
278
  };
279
- //# sourceMappingURL=completion-BELZL7ND.js.map
@@ -2,18 +2,27 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
2
2
  import {
3
3
  configClaudeCode,
4
4
  configClaudeDesktop,
5
+ configCodex,
5
6
  configCursor,
7
+ configGrok,
6
8
  configHttpUrl,
7
9
  configVscode,
8
10
  getClaudeCodeUserConfigPath,
9
11
  getClaudeDesktopConfigPath,
12
+ getClaudeDesktopInstructions,
13
+ getCodexConfigPath,
14
+ getCodexInstructions,
10
15
  getCursorConfigPath,
11
16
  getGeminiCliSettingsPath,
17
+ getGrokInstructions,
12
18
  getVscodeConfigPath,
19
+ getVscodeInstallDeeplink,
20
+ getVscodeInstructions,
13
21
  getWindsurfMcpConfigPath,
14
22
  printChatGptDesktopInstructions,
15
23
  removeClaudeCodeUserConfig,
16
24
  removeClaudeDesktopConfig,
25
+ removeCodexConfig,
17
26
  removeCursorConfig,
18
27
  removeGeminiCliConfig,
19
28
  removeVscodeConfig,
@@ -21,28 +30,38 @@ import {
21
30
  writeClaudeCodeConfig,
22
31
  writeClaudeCodeUserConfig,
23
32
  writeClaudeDesktopConfig,
33
+ writeCodexConfig,
24
34
  writeCursorConfig,
25
35
  writeGeminiCliConfig,
26
36
  writeVscodeConfig,
27
37
  writeWindsurfConfig
28
- } from "./chunk-2MYMHMBF.js";
29
- import "./chunk-V77LO4RO.js";
30
- import "./chunk-KBVPIZS4.js";
38
+ } from "./chunk-QDZ7MAVN.js";
39
+ import "./chunk-6PC3HUAK.js";
40
+ import "./chunk-ILVPOLA7.js";
31
41
  export {
32
42
  configClaudeCode,
33
43
  configClaudeDesktop,
44
+ configCodex,
34
45
  configCursor,
46
+ configGrok,
35
47
  configHttpUrl,
36
48
  configVscode,
37
49
  getClaudeCodeUserConfigPath,
38
50
  getClaudeDesktopConfigPath,
51
+ getClaudeDesktopInstructions,
52
+ getCodexConfigPath,
53
+ getCodexInstructions,
39
54
  getCursorConfigPath,
40
55
  getGeminiCliSettingsPath,
56
+ getGrokInstructions,
41
57
  getVscodeConfigPath,
58
+ getVscodeInstallDeeplink,
59
+ getVscodeInstructions,
42
60
  getWindsurfMcpConfigPath,
43
61
  printChatGptDesktopInstructions,
44
62
  removeClaudeCodeUserConfig,
45
63
  removeClaudeDesktopConfig,
64
+ removeCodexConfig,
46
65
  removeCursorConfig,
47
66
  removeGeminiCliConfig,
48
67
  removeVscodeConfig,
@@ -50,9 +69,9 @@ export {
50
69
  writeClaudeCodeConfig,
51
70
  writeClaudeCodeUserConfig,
52
71
  writeClaudeDesktopConfig,
72
+ writeCodexConfig,
53
73
  writeCursorConfig,
54
74
  writeGeminiCliConfig,
55
75
  writeVscodeConfig,
56
76
  writeWindsurfConfig
57
77
  };
58
- //# sourceMappingURL=config-TDX4VUGW.js.map
@@ -12,8 +12,8 @@ import {
12
12
  saveCredentials,
13
13
  setCliFlags,
14
14
  writeJsonFile
15
- } from "./chunk-V77LO4RO.js";
16
- import "./chunk-KBVPIZS4.js";
15
+ } from "./chunk-6PC3HUAK.js";
16
+ import "./chunk-ILVPOLA7.js";
17
17
  export {
18
18
  ensureConfigDir,
19
19
  getConfig,
@@ -28,4 +28,3 @@ export {
28
28
  setCliFlags,
29
29
  writeJsonFile
30
30
  };
31
- //# sourceMappingURL=config-dir-V43W2WIA.js.map
@@ -1,16 +1,17 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  fetchToolCatalog
4
- } from "./chunk-IZTN7WFH.js";
4
+ } from "./chunk-Q7VBYLX7.js";
5
+ import "./chunk-ZXKFJQDE.js";
5
6
  import {
6
7
  debug,
7
8
  info,
8
9
  shouldOutputJson,
9
10
  successEnvelope,
10
11
  writeOutput
11
- } from "./chunk-XYBEFFZ3.js";
12
- import "./chunk-V77LO4RO.js";
13
- import "./chunk-KBVPIZS4.js";
12
+ } from "./chunk-725R3KLJ.js";
13
+ import "./chunk-6PC3HUAK.js";
14
+ import "./chunk-ILVPOLA7.js";
14
15
 
15
16
  // src/cli/doctor.ts
16
17
  var DEFAULT_API_URL = "https://mcp.hiveintelligence.xyz";
@@ -23,7 +24,7 @@ async function runDoctor(opts) {
23
24
  checks.push({
24
25
  check: "HIVE_API_KEY",
25
26
  status: apiKey ? "PASS" : "INFO",
26
- detail: apiKey ? `Set (${apiKey.slice(0, 4)}...)` : "Not set (optional \u2014 API is currently free)"
27
+ detail: apiKey ? `Set (${apiKey.slice(0, 4)}...)` : "Not set (keyless mode: discovery + limited free hero calls; set a key for full access)"
27
28
  });
28
29
  const apiUrl = process.env.HIVE_API_URL;
29
30
  checks.push({
@@ -94,6 +95,30 @@ async function runDoctor(opts) {
94
95
  });
95
96
  }
96
97
  }
98
+ {
99
+ const { SERVER_VERSION } = await import("./version-Z4HJL4VV.js");
100
+ const { fetchLatestVersion, isNewerVersion } = await import("./update-check-IEXPOYYR.js");
101
+ const latest = await fetchLatestVersion(5e3);
102
+ if (latest === null) {
103
+ checks.push({
104
+ check: "Updates",
105
+ status: "INFO",
106
+ detail: `v${SERVER_VERSION} (could not reach npm registry)`
107
+ });
108
+ } else if (isNewerVersion(latest, SERVER_VERSION)) {
109
+ checks.push({
110
+ check: "Updates",
111
+ status: "WARN",
112
+ detail: `v${SERVER_VERSION} -> v${latest} available \u2014 run: hive upgrade`
113
+ });
114
+ } else {
115
+ checks.push({
116
+ check: "Updates",
117
+ status: "PASS",
118
+ detail: `v${SERVER_VERSION} (latest)`
119
+ });
120
+ }
121
+ }
97
122
  if (opts.probe) {
98
123
  const probeUrl = `${getApiUrl()}/health?run=true`;
99
124
  debug(`Probe: GET ${probeUrl}`);
@@ -163,7 +188,7 @@ async function runDoctor(opts) {
163
188
  if (fails > 0) process.exit(1);
164
189
  return;
165
190
  }
166
- const { table } = await import("./format-TSFSI2K7.js");
191
+ const { table } = await import("./format-H7FOQSYY.js");
167
192
  info("\nHive MCP Doctor\n");
168
193
  info(
169
194
  table(
@@ -179,9 +204,9 @@ ${fails === 0 ? "All checks passed" : `${fails} issues found`}${warns ? ` (${war
179
204
  if (fails > 0) process.exit(1);
180
205
  }
181
206
  async function runStatus() {
182
- const { SERVER_VERSION } = await import("./mcpServer-AEX3RQ4U.js");
183
- const { resolveApiKey, resolveApiUrl } = await import("./config-dir-V43W2WIA.js");
184
- const { getActiveProfile, maskKey } = await import("./auth-KKINNBXT.js");
207
+ const { SERVER_VERSION } = await import("./mcpServer-RUEOTTF7.js");
208
+ const { resolveApiKey, resolveApiUrl } = await import("./config-dir-5IH7MOOT.js");
209
+ const { getActiveProfile, maskKey } = await import("./auth-EZFJ5RYB.js");
185
210
  const apiUrl = resolveApiUrl();
186
211
  const apiKey = resolveApiKey();
187
212
  const profile = getActiveProfile();
@@ -228,4 +253,3 @@ export {
228
253
  runDoctor,
229
254
  runStatus
230
255
  };
231
- //# sourceMappingURL=doctor-5K5UWHNX.js.map
@@ -5,8 +5,8 @@ import {
5
5
  ExitCode,
6
6
  classifyError,
7
7
  suggestSimilarTools
8
- } from "./chunk-KGYBTXIN.js";
9
- import "./chunk-KBVPIZS4.js";
8
+ } from "./chunk-R6YZTFQL.js";
9
+ import "./chunk-ILVPOLA7.js";
10
10
  export {
11
11
  CliError,
12
12
  ERROR_DOC_URLS,
@@ -14,4 +14,3 @@ export {
14
14
  classifyError,
15
15
  suggestSimilarTools
16
16
  };
17
- //# sourceMappingURL=errors-E6MVUBNA.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
- import "./chunk-KBVPIZS4.js";
2
+ import "./chunk-ILVPOLA7.js";
3
3
 
4
4
  // src/cli/format.ts
5
5
  function pad(str, width) {
@@ -40,4 +40,3 @@ export {
40
40
  pad,
41
41
  table
42
42
  };
43
- //# sourceMappingURL=format-TSFSI2K7.js.map
@@ -1,13 +1,57 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
- import "./chunk-KBVPIZS4.js";
2
+ import "./chunk-ILVPOLA7.js";
3
3
 
4
4
  // src/cli/init.ts
5
- import { existsSync, readFileSync, writeFileSync } from "fs";
5
+ import { chmodSync, existsSync, readFileSync, writeFileSync } from "fs";
6
6
  import { join } from "path";
7
7
  import { createInterface } from "readline";
8
8
  var DEFAULT_API_URL = "https://mcp.hiveintelligence.xyz";
9
- var rl = createInterface({ input: process.stdin, output: process.stdout });
10
- var ask = (q) => new Promise((resolve) => rl.question(q, resolve));
9
+ var ask = (q) => new Promise((resolve) => {
10
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
11
+ rl.question(q, (answer) => {
12
+ rl.close();
13
+ resolve(answer);
14
+ });
15
+ });
16
+ function askSecret(q) {
17
+ if (!process.stdin.isTTY || !process.stdin.setRawMode) return ask(q);
18
+ process.stdout.write(q);
19
+ return new Promise((resolve, reject) => {
20
+ let value = "";
21
+ const cleanup = () => {
22
+ process.stdin.off("data", onData);
23
+ process.stdin.setRawMode(false);
24
+ process.stdin.pause();
25
+ process.stdout.write("\n");
26
+ };
27
+ const onData = (chunk) => {
28
+ const input = chunk.toString("utf8");
29
+ if (input === "") {
30
+ cleanup();
31
+ reject(new Error("Setup cancelled."));
32
+ return;
33
+ }
34
+ if (input === "\r" || input === "\n") {
35
+ cleanup();
36
+ resolve(value);
37
+ return;
38
+ }
39
+ if (input === "\x7F" || input === "\b") {
40
+ value = value.slice(0, -1);
41
+ return;
42
+ }
43
+ value += input;
44
+ };
45
+ process.stdin.setRawMode(true);
46
+ process.stdin.resume();
47
+ process.stdin.on("data", onData);
48
+ });
49
+ }
50
+ function redactEnvForDisplay(lines) {
51
+ return lines.split("\n").map(
52
+ (line) => line.startsWith("HIVE_API_KEY=") ? "HIVE_API_KEY=<redacted>" : line
53
+ ).join("\n");
54
+ }
11
55
  async function runInit(opts) {
12
56
  console.log("\nHive MCP Setup\n");
13
57
  const envPath = join(process.cwd(), ".env");
@@ -33,7 +77,7 @@ async function runInit(opts) {
33
77
  }
34
78
  } else {
35
79
  const currentKeyTag = apiKey ? ` [current: ${apiKey.slice(0, 6)}...]` : "";
36
- const keyInput = await ask(
80
+ const keyInput = await askSecret(
37
81
  `HIVE_API_KEY${currentKeyTag}
38
82
  Your Hive Intelligence API key: `
39
83
  );
@@ -50,7 +94,6 @@ HIVE_API_URL${currentUrlTag}
50
94
  apiUrl = urlInput.trim();
51
95
  }
52
96
  }
53
- rl.close();
54
97
  if (apiKey) existing.HIVE_API_KEY = apiKey;
55
98
  if (apiUrl) existing.HIVE_API_URL = apiUrl;
56
99
  if (apiKey) {
@@ -88,15 +131,15 @@ Validating API key against ${baseUrl}...`);
88
131
  const lines = Object.entries(existing).map(([k, v]) => `${k}=${v}`).join("\n");
89
132
  if (opts.dryRun) {
90
133
  console.log("Dry run \u2014 would write to .env:\n");
91
- console.log(lines);
134
+ console.log(redactEnvForDisplay(lines));
92
135
  console.log("");
93
136
  return;
94
137
  }
95
- writeFileSync(envPath, lines + "\n", "utf-8");
138
+ writeFileSync(envPath, lines + "\n", { encoding: "utf-8", mode: 384 });
139
+ chmodSync(envPath, 384);
96
140
  console.log(`.env written to ${envPath}`);
97
141
  console.log("Run: hive doctor to verify connectivity\n");
98
142
  }
99
143
  export {
100
144
  runInit
101
145
  };
102
- //# sourceMappingURL=init-YQ5NBICF.js.map