hyperclaw 4.0.2 → 5.0.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.
Files changed (194) hide show
  1. package/README.md +246 -60
  2. package/dist/a2ui-protocol-CfBI44-Q.js +75 -0
  3. package/dist/agents-routing-ChHiZp36.js +327 -0
  4. package/dist/agents-routing-ChqZ6l2S.js +4 -0
  5. package/dist/api-keys-guide-BCcOl0Q7.js +149 -0
  6. package/dist/api-keys-guide-CGn5BSF7.js +149 -0
  7. package/dist/audit-BJohI_vC.js +441 -0
  8. package/dist/audit-BaIiyWFu.js +441 -0
  9. package/dist/bounty-tools-CY_i91DU.js +211 -0
  10. package/dist/bounty-tools-DWudyZie.js +211 -0
  11. package/dist/browser-tools-BsTeGMnX.js +5 -0
  12. package/dist/browser-tools-D8_rLe2p.js +179 -0
  13. package/dist/claw-tasks-CgTsiNE8.js +80 -0
  14. package/dist/claw-tasks-Cyzdbhz_.js +80 -0
  15. package/dist/connector-5N0-X_xs.js +194 -0
  16. package/dist/connector-B3v0qcXg.js +425 -0
  17. package/dist/connector-B8R3iBY1.js +280 -0
  18. package/dist/connector-BAM-08NN.js +189 -0
  19. package/dist/connector-BC8FIVu4.js +181 -0
  20. package/dist/connector-BDmwwaVc.js +213 -0
  21. package/dist/connector-BGjbBy69.js +225 -0
  22. package/dist/connector-BO2SRzfG.js +218 -0
  23. package/dist/connector-BfXky0L3.js +167 -0
  24. package/dist/connector-BiiSJpx3.js +192 -0
  25. package/dist/connector-BnDmIhIu.js +85 -0
  26. package/dist/connector-C1HSoUyk.js +189 -0
  27. package/dist/connector-CKQHZOXg.js +568 -0
  28. package/dist/connector-CRl-iidy.js +239 -0
  29. package/dist/connector-Ci9glMD-.js +340 -0
  30. package/dist/connector-CjtZIEDj.js +181 -0
  31. package/dist/connector-Ck6JtOsX.js +531 -0
  32. package/dist/connector-D8Kelee0.js +286 -0
  33. package/dist/connector-DAnRJ0oP.js +162 -0
  34. package/dist/connector-DXTp5PE8.js +508 -0
  35. package/dist/connector-Dih6dUPP.js +173 -0
  36. package/dist/connector-DqTH_tPX.js +182 -0
  37. package/dist/connector-DrnEiiyP.js +419 -0
  38. package/dist/connector-DtR5GGTX.js +167 -0
  39. package/dist/connector-Tky_qS_K.js +350 -0
  40. package/dist/connector-ZSc3oTTy.js +305 -0
  41. package/dist/connector-sW5yhU1m.js +498 -0
  42. package/dist/connector-u3ICd3Ic.js +552 -0
  43. package/dist/cost-tracker-Ca1UPZ33.js +103 -0
  44. package/dist/cost-tracker-DD9wtWsr.js +103 -0
  45. package/dist/credentials-store-C6ir0Dae.js +4 -0
  46. package/dist/credentials-store-CA8UtK0T.js +77 -0
  47. package/dist/credentials-store-Cm7DH-kh.js +4 -0
  48. package/dist/credentials-store-H13LqOwJ.js +77 -0
  49. package/dist/cron-tasks-Bli7Kzd2.js +82 -0
  50. package/dist/cron-tasks-_pqQCmxc.js +82 -0
  51. package/dist/daemon-7ViroziB.js +5 -0
  52. package/dist/daemon-BfyKmZhr.js +318 -0
  53. package/dist/daemon-Bg4GtCmc.js +318 -0
  54. package/dist/daemon-DhmwY8k4.js +5 -0
  55. package/dist/delivery-BmIYy9VQ.js +4 -0
  56. package/dist/delivery-DVHmv1IR.js +4 -0
  57. package/dist/delivery-DpMX0Yyc.js +95 -0
  58. package/dist/delivery-pWUPBp1F.js +95 -0
  59. package/dist/destructive-gate-D6vWOdEl.js +101 -0
  60. package/dist/destructive-gate-DZt71UZR.js +101 -0
  61. package/dist/developer-keys-CPWT7Q6S.js +8 -0
  62. package/dist/developer-keys-DrrcUqFa.js +127 -0
  63. package/dist/doctor-BvCe8BBk.js +230 -0
  64. package/dist/doctor-CxyPLYsJ.js +6 -0
  65. package/dist/engine-B0kLfRL0.js +256 -0
  66. package/dist/engine-BJUpRUOv.js +7 -0
  67. package/dist/engine-CEDSqXfw.js +256 -0
  68. package/dist/engine-Da4JMNpI.js +7 -0
  69. package/dist/env-resolve-17ekEU6p.js +10 -0
  70. package/dist/env-resolve-CiXbWYwe.js +10 -0
  71. package/dist/env-resolve-CmGWhWXJ.js +115 -0
  72. package/dist/env-resolve-Z2XF6leB.js +115 -0
  73. package/dist/extraction-tools-HOZstZ0y.js +91 -0
  74. package/dist/extraction-tools-m4lmAv7l.js +5 -0
  75. package/dist/form_data-Cz040rio.js +8657 -0
  76. package/dist/gmail-watch-setup-Du7DVV7S.js +40 -0
  77. package/dist/health-B-asI__D.js +6 -0
  78. package/dist/health-Ds2YlpTB.js +152 -0
  79. package/dist/heartbeat-engine-BYT5ayQH.js +83 -0
  80. package/dist/heartbeat-engine-Ut6pXBD6.js +83 -0
  81. package/dist/hub-9LaKnLjY.js +6 -0
  82. package/dist/hub-CfwUz9YW.js +515 -0
  83. package/dist/hub-D0XwdjM-.js +515 -0
  84. package/dist/hub-LiD5Iztb.js +6 -0
  85. package/dist/hyperclawbot-CBiDSKsa.js +505 -0
  86. package/dist/hyperclawbot-zvczQgKx.js +505 -0
  87. package/dist/inference-0mlFQqIm.js +922 -0
  88. package/dist/inference-BKVkBREb.js +6 -0
  89. package/dist/inference-DCXH4Q3x.js +922 -0
  90. package/dist/inference-SzqFe_nk.js +6 -0
  91. package/dist/knowledge-graph-DE5lSF02.js +131 -0
  92. package/dist/knowledge-graph-iBG76fvm.js +131 -0
  93. package/dist/loader-BkDi8MD9.js +400 -0
  94. package/dist/loader-CC45xGpC.js +4 -0
  95. package/dist/loader-CnEdOyjT.js +400 -0
  96. package/dist/loader-DI2qDRPC.js +4 -0
  97. package/dist/logger-Cp8wC7F8.js +83 -0
  98. package/dist/logger-ybOp7VOC.js +83 -0
  99. package/dist/manager-03ipO9R0.js +105 -0
  100. package/dist/manager-B2Gls5RG.js +218 -0
  101. package/dist/manager-BpDfbDjg.js +117 -0
  102. package/dist/manager-Bxl0sqlh.js +4 -0
  103. package/dist/manager-CWNSML5D.js +117 -0
  104. package/dist/manager-CrVDn6eN.js +6 -0
  105. package/dist/manager-FCgF1plu.js +218 -0
  106. package/dist/manager-SJe9gt-q.js +4 -0
  107. package/dist/manager-rgCsaWT1.js +40 -0
  108. package/dist/mcp-CfoSU4Uz.js +139 -0
  109. package/dist/mcp-loader-CvxRDtPC.js +94 -0
  110. package/dist/mcp-loader-DkRBsLpk.js +94 -0
  111. package/dist/memory-BlHL7JCO.js +4 -0
  112. package/dist/memory-DsS_eFvJ.js +270 -0
  113. package/dist/memory-auto-BkvtSFUw.js +5 -0
  114. package/dist/memory-auto-Bnz_-1wP.js +306 -0
  115. package/dist/memory-auto-CpQHZlEJ.js +306 -0
  116. package/dist/memory-auto-Z6LCf-iK.js +5 -0
  117. package/dist/memory-integration-cSYkZyEo.js +91 -0
  118. package/dist/memory-integration-g2vxwgoE.js +91 -0
  119. package/dist/moltbook-BtLDZTfM.js +81 -0
  120. package/dist/moltbook-Cl8cQfxJ.js +81 -0
  121. package/dist/node-Dw2Gi-cP.js +222 -0
  122. package/dist/nodes-registry-B8dmrlLv.js +52 -0
  123. package/dist/nodes-registry-C9dCFwjh.js +52 -0
  124. package/dist/oauth-flow-CeaaGAz0.js +150 -0
  125. package/dist/oauth-flow-DQPvMHRH.js +150 -0
  126. package/dist/oauth-provider-B4dzn56l.js +110 -0
  127. package/dist/oauth-provider-Uo4Nib_c.js +110 -0
  128. package/dist/observability-BV-Yx0V9.js +89 -0
  129. package/dist/observability-nZ3CBIxG.js +89 -0
  130. package/dist/onboard-0WoDxbv_.js +10 -0
  131. package/dist/onboard-BBBWcfhp.js +10 -0
  132. package/dist/onboard-BXNXCQp4.js +4070 -0
  133. package/dist/onboard-Bw28IRQ3.js +4070 -0
  134. package/dist/orchestrator-BovkM63z.js +6 -0
  135. package/dist/orchestrator-DSbpkP1X.js +189 -0
  136. package/dist/orchestrator-DmnEvMaL.js +189 -0
  137. package/dist/orchestrator-RI3bpqqc.js +6 -0
  138. package/dist/osint-B4_m3VHQ.js +277 -0
  139. package/dist/pairing-6iM27aD8.js +196 -0
  140. package/dist/pairing-dGoiGepK.js +4 -0
  141. package/dist/pc-access-CgCsYrpt.js +8 -0
  142. package/dist/pc-access-_iH2aorG.js +819 -0
  143. package/dist/pending-approval-BgNjjuI2.js +22 -0
  144. package/dist/pending-approval-CUXjysAo.js +22 -0
  145. package/dist/reminders-store-Drjed_-h.js +58 -0
  146. package/dist/renderer-BVQrd0_g.js +225 -0
  147. package/dist/rules-BE4GV6cV.js +103 -0
  148. package/dist/run-main.js +1639 -460
  149. package/dist/runner-CJFJUtPm.js +1271 -0
  150. package/dist/runner-DatMMYYE.js +1271 -0
  151. package/dist/sdk/index.js +2 -2
  152. package/dist/sdk/index.mjs +2 -2
  153. package/dist/security-BqNyT4ID.js +4 -0
  154. package/dist/security-tpgqPWWH.js +73 -0
  155. package/dist/server-Brl_HQUB.js +1255 -0
  156. package/dist/server-D4wVHiX9.js +4 -0
  157. package/dist/server-Dh3JlBFB.js +1255 -0
  158. package/dist/server-DhfipkwN.js +4 -0
  159. package/dist/session-store-BUiPz0Vv.js +5 -0
  160. package/dist/session-store-is4B6qmD.js +113 -0
  161. package/dist/sessions-tools-CbUTFe4i.js +5 -0
  162. package/dist/sessions-tools-CeqD7iil.js +95 -0
  163. package/dist/skill-loader-BaNLVmJy.js +7 -0
  164. package/dist/skill-loader-HgpF6Vqs.js +159 -0
  165. package/dist/skill-runtime-BXWd-Ktf.js +102 -0
  166. package/dist/skill-runtime-CJN24QPW.js +102 -0
  167. package/dist/skill-runtime-jgklm02e.js +5 -0
  168. package/dist/skill-runtime-w1ig_lcw.js +5 -0
  169. package/dist/src-Bhybpk1J.js +63 -0
  170. package/dist/src-BxPHKO5x.js +63 -0
  171. package/dist/src-DIc-L2IG.js +20 -0
  172. package/dist/src-DMJ4-uqk.js +458 -0
  173. package/dist/src-g_rNx5rh.js +458 -0
  174. package/dist/sub-agent-tools-CHQoHz9c.js +39 -0
  175. package/dist/sub-agent-tools-DHY-4WWM.js +39 -0
  176. package/dist/theme-DcxwcUgZ.js +180 -0
  177. package/dist/theme-cx0fkgWC.js +8 -0
  178. package/dist/tool-policy-CNT-mF2Z.js +189 -0
  179. package/dist/tool-policy-DZvF8xlQ.js +189 -0
  180. package/dist/tts-elevenlabs-BRosZv-f.js +61 -0
  181. package/dist/tts-elevenlabs-C06nUxMK.js +61 -0
  182. package/dist/update-check-C2Dz85wJ.js +81 -0
  183. package/dist/update-check-w4XuxVl7.js +81 -0
  184. package/dist/vision-BMmiIKy7.js +121 -0
  185. package/dist/vision-JOtOS1Br.js +121 -0
  186. package/dist/vision-tools-CB28ZCO_.js +5 -0
  187. package/dist/vision-tools-DVuYc17I.js +51 -0
  188. package/dist/vision-tools-U3YC4L-g.js +5 -0
  189. package/dist/vision-tools-vPPwQ-0N.js +51 -0
  190. package/dist/voice-transcription-B555DbWR.js +138 -0
  191. package/dist/voice-transcription-DBo5hXmu.js +138 -0
  192. package/dist/website-watch-tools-DFMrJU-R.js +139 -0
  193. package/dist/website-watch-tools-Du3W5sN7.js +5 -0
  194. package/package.json +1 -1
@@ -0,0 +1,515 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ const require_paths = require('./paths-AIyBxIzm.js');
3
+ const require_paths$1 = require('./paths-DPovhojT.js');
4
+ const chalk = require_chunk.__toESM(require("chalk"));
5
+ const ora = require_chunk.__toESM(require("ora"));
6
+ const fs_extra = require_chunk.__toESM(require("fs-extra"));
7
+ const path = require_chunk.__toESM(require("path"));
8
+ const http = require_chunk.__toESM(require("http"));
9
+ const https = require_chunk.__toESM(require("https"));
10
+ const tar = require_chunk.__toESM(require("tar"));
11
+
12
+ //#region src/skills/clawhub.ts
13
+ require_paths$1.init_paths();
14
+ const CLAWHUB_API = process.env.CLAWHUB_API_URL || "https://clawhub.com";
15
+ const WORKSPACE_SKILLS$1 = path.default.join(require_paths.getHyperClawDir(), "workspace", "skills");
16
+ async function searchSkills(query, category) {
17
+ const q = new URLSearchParams({ q: query });
18
+ if (category) q.set("category", category);
19
+ const url = `${CLAWHUB_API}/api/skills/search?${q}`;
20
+ try {
21
+ const body = await fetchJson(url);
22
+ return Array.isArray(body.skills) ? body.skills : Array.isArray(body) ? body : [];
23
+ } catch (e) {
24
+ return [];
25
+ }
26
+ }
27
+ async function installSkill(skillId, version) {
28
+ const ver = version ? `@${version}` : "";
29
+ const url = `${CLAWHUB_API}/api/skills/${encodeURIComponent(skillId)}/download${ver}`;
30
+ try {
31
+ const body = await fetchJson(url);
32
+ const tarballUrl = body.url || body.tarball;
33
+ if (!tarballUrl) throw new Error("No download URL in registry response");
34
+ await fs_extra.default.ensureDir(WORKSPACE_SKILLS$1);
35
+ const destDir = path.default.join(WORKSPACE_SKILLS$1, skillId);
36
+ await fs_extra.default.ensureDir(destDir);
37
+ if (body.content || body.skillMarkdown) {
38
+ const content = body.content || body.skillMarkdown;
39
+ await fs_extra.default.writeFile(path.default.join(destDir, "SKILL.md"), content, "utf8");
40
+ return destDir;
41
+ }
42
+ const tarballBuffer = await fetchBuffer(tarballUrl);
43
+ const extractDir = path.default.join(path.default.dirname(destDir), `.skill-extract-${skillId}-${Date.now()}`);
44
+ await fs_extra.default.ensureDir(extractDir);
45
+ try {
46
+ const tarPath = path.default.join(extractDir, "skill.tar.gz");
47
+ await fs_extra.default.writeFile(tarPath, tarballBuffer);
48
+ await tar.default.x({
49
+ file: tarPath,
50
+ cwd: extractDir
51
+ });
52
+ await fs_extra.default.remove(tarPath);
53
+ const entries = await fs_extra.default.readdir(extractDir);
54
+ let skillDir = extractDir;
55
+ const topSkill = path.default.join(extractDir, "SKILL.md");
56
+ if (!await fs_extra.default.pathExists(topSkill)) {
57
+ const sub = entries.find((e) => e !== "package.json" && !e.startsWith("."));
58
+ if (sub) {
59
+ const subPath = path.default.join(extractDir, sub);
60
+ if ((await fs_extra.default.stat(subPath)).isDirectory() && await fs_extra.default.pathExists(path.default.join(subPath, "SKILL.md"))) skillDir = subPath;
61
+ }
62
+ }
63
+ await fs_extra.default.copy(skillDir, destDir, { filter: (src) => !src.includes("node_modules") });
64
+ if (!await fs_extra.default.pathExists(path.default.join(destDir, "SKILL.md"))) throw new Error("Tarball did not contain SKILL.md");
65
+ return destDir;
66
+ } finally {
67
+ await fs_extra.default.remove(extractDir).catch(() => {});
68
+ }
69
+ } catch (e) {
70
+ if (e.message?.includes("ENOTFOUND") || e.code === "ENOTFOUND") throw new Error(`ClawHub registry unavailable. Install manually: mkdir -p ~/.hyperclaw/workspace/skills/${skillId} && add SKILL.md`);
71
+ throw e;
72
+ }
73
+ }
74
+ async function listInstalledFromClawHub() {
75
+ if (!await fs_extra.default.pathExists(WORKSPACE_SKILLS$1)) return [];
76
+ const dirs = await fs_extra.default.readdir(WORKSPACE_SKILLS$1);
77
+ const out = [];
78
+ for (const id of dirs) {
79
+ const p = path.default.join(WORKSPACE_SKILLS$1, id, "SKILL.md");
80
+ if (await fs_extra.default.pathExists(p)) out.push(id);
81
+ }
82
+ return out;
83
+ }
84
+ function fetchBuffer(url) {
85
+ return new Promise((resolve, reject) => {
86
+ const parsed = new URL(url);
87
+ const mod = parsed.protocol === "https:" ? https.default : http.default;
88
+ const req = mod.request({
89
+ hostname: parsed.hostname,
90
+ port: parsed.port || (parsed.protocol === "https:" ? 443 : 80),
91
+ path: parsed.pathname + parsed.search,
92
+ method: "GET",
93
+ headers: { "User-Agent": "HyperClaw/5.0.0" }
94
+ }, (res) => {
95
+ const chunks = [];
96
+ res.on("data", (c) => chunks.push(c));
97
+ res.on("end", () => resolve(Buffer.concat(chunks)));
98
+ });
99
+ req.on("error", reject);
100
+ req.setTimeout(3e4, () => {
101
+ req.destroy();
102
+ reject(new Error("Tarball download timeout"));
103
+ });
104
+ req.end();
105
+ });
106
+ }
107
+ function fetchJson(url) {
108
+ return new Promise((resolve, reject) => {
109
+ const parsed = new URL(url);
110
+ const req = https.default.request({
111
+ hostname: parsed.hostname,
112
+ port: 443,
113
+ path: parsed.pathname + parsed.search,
114
+ method: "GET",
115
+ headers: { "User-Agent": "HyperClaw/5.0.0" }
116
+ }, (res) => {
117
+ let data = "";
118
+ res.on("data", (c) => data += c);
119
+ res.on("end", () => {
120
+ try {
121
+ resolve(JSON.parse(data));
122
+ } catch {
123
+ reject(new Error("Invalid JSON from registry"));
124
+ }
125
+ });
126
+ });
127
+ req.on("error", reject);
128
+ req.setTimeout(15e3, () => {
129
+ req.destroy();
130
+ reject(new Error("Timeout"));
131
+ });
132
+ req.end();
133
+ });
134
+ }
135
+
136
+ //#endregion
137
+ //#region src/plugins/hub.ts
138
+ require_paths$1.init_paths();
139
+ const SKILL_REGISTRY = [
140
+ {
141
+ id: "web-search",
142
+ name: "Web Search (Tavily)",
143
+ version: "2.1.0",
144
+ description: "Real-time web search via Tavily API. Powers research and news queries.",
145
+ author: "hyperclaw-team",
146
+ category: "utility",
147
+ downloads: 48200,
148
+ rating: 4.8,
149
+ risk: "clean",
150
+ requiresKeys: ["TAVILY_API_KEY"],
151
+ tags: [
152
+ "search",
153
+ "internet",
154
+ "tavily"
155
+ ]
156
+ },
157
+ {
158
+ id: "calendar",
159
+ name: "Google Calendar",
160
+ version: "1.4.0",
161
+ description: "Read and create Google Calendar events via OAuth.",
162
+ author: "hyperclaw-team",
163
+ category: "productivity",
164
+ downloads: 32100,
165
+ rating: 4.6,
166
+ risk: "clean",
167
+ requiresKeys: ["GOOGLE_CALENDAR_CREDS"],
168
+ tags: [
169
+ "calendar",
170
+ "schedule",
171
+ "google"
172
+ ],
173
+ npmPackage: "googleapis"
174
+ },
175
+ {
176
+ id: "github",
177
+ name: "GitHub Integration",
178
+ version: "1.2.0",
179
+ description: "Create issues, PRs, read repos. Requires GitHub PAT.",
180
+ author: "hyperclaw-team",
181
+ category: "integration",
182
+ downloads: 27800,
183
+ rating: 4.7,
184
+ risk: "clean",
185
+ requiresKeys: ["GITHUB_TOKEN"],
186
+ tags: [
187
+ "github",
188
+ "git",
189
+ "code"
190
+ ],
191
+ npmPackage: "@octokit/rest"
192
+ },
193
+ {
194
+ id: "home-assistant",
195
+ name: "Home Assistant",
196
+ version: "1.5.0",
197
+ description: "Control smart home devices via Home Assistant REST API.",
198
+ author: "hyperclaw-team",
199
+ category: "automation",
200
+ downloads: 19400,
201
+ rating: 4.5,
202
+ risk: "clean",
203
+ requiresKeys: ["HA_URL", "HA_TOKEN"],
204
+ tags: [
205
+ "smart-home",
206
+ "iot",
207
+ "automation"
208
+ ]
209
+ },
210
+ {
211
+ id: "code-executor",
212
+ name: "Code Executor (Sandbox)",
213
+ version: "3.0.1",
214
+ description: "Execute Python/JS/Bash code in a sandboxed Docker container.",
215
+ author: "hyperclaw-team",
216
+ category: "utility",
217
+ downloads: 41e3,
218
+ rating: 4.9,
219
+ risk: "clean",
220
+ tags: [
221
+ "code",
222
+ "sandbox",
223
+ "python",
224
+ "bash"
225
+ ],
226
+ npmPackage: "dockerode"
227
+ },
228
+ {
229
+ id: "translator",
230
+ name: "Real-time Translator",
231
+ version: "2.0.0",
232
+ description: "DeepL + Google Translate integration for 90+ languages.",
233
+ author: "hyperclaw-team",
234
+ category: "utility",
235
+ downloads: 38500,
236
+ rating: 4.7,
237
+ risk: "clean",
238
+ requiresKeys: ["DEEPL_API_KEY"],
239
+ tags: [
240
+ "translate",
241
+ "language",
242
+ "deepl"
243
+ ],
244
+ installed: true
245
+ },
246
+ {
247
+ id: "reminders",
248
+ name: "Smart Reminders",
249
+ version: "2.1.0",
250
+ description: "Natural language reminders with cron scheduling.",
251
+ author: "hyperclaw-team",
252
+ category: "productivity",
253
+ downloads: 29e3,
254
+ rating: 4.6,
255
+ risk: "clean",
256
+ tags: [
257
+ "reminders",
258
+ "cron",
259
+ "schedule"
260
+ ],
261
+ installed: true
262
+ },
263
+ {
264
+ id: "weather",
265
+ name: "Weather Forecast",
266
+ version: "1.3.0",
267
+ description: "OpenWeatherMap integration. Current + 7-day forecast.",
268
+ author: "hyperclaw-team",
269
+ category: "utility",
270
+ downloads: 22100,
271
+ rating: 4.4,
272
+ risk: "clean",
273
+ requiresKeys: ["OPENWEATHER_API_KEY"],
274
+ tags: ["weather", "forecast"]
275
+ },
276
+ {
277
+ id: "stealth-browser",
278
+ name: "Stealth Browser",
279
+ version: "1.0.3",
280
+ description: "Headless browser with fingerprint evasion. Can bypass bot detection.",
281
+ author: "unknown-dev",
282
+ category: "utility",
283
+ downloads: 3200,
284
+ rating: 3.1,
285
+ risk: "suspicious",
286
+ riskReason: "Fingerprint evasion may violate ToS on some sites. VirusTotal: 2/72 engines flagged.",
287
+ tags: [
288
+ "browser",
289
+ "puppeteer",
290
+ "stealth"
291
+ ],
292
+ npmPackage: "puppeteer-extra-plugin-stealth"
293
+ },
294
+ {
295
+ id: "db-reader",
296
+ name: "Database Reader",
297
+ version: "1.1.0",
298
+ description: "Read from PostgreSQL/MySQL/SQLite databases.",
299
+ author: "hyperclaw-team",
300
+ category: "integration",
301
+ downloads: 15600,
302
+ rating: 4.5,
303
+ risk: "clean",
304
+ requiresKeys: ["DATABASE_URL"],
305
+ tags: [
306
+ "database",
307
+ "sql",
308
+ "postgres"
309
+ ],
310
+ npmPackage: "pg"
311
+ },
312
+ {
313
+ id: "keylogger-util",
314
+ name: "Input Monitor Pro",
315
+ version: "0.9.1",
316
+ description: "Monitors keyboard events for automation triggers.",
317
+ author: "shadowy-scripts",
318
+ category: "automation",
319
+ downloads: 890,
320
+ rating: 1.8,
321
+ risk: "dangerous",
322
+ riskReason: "Detected keylogging behavior. VirusTotal: 31/72 engines flagged as malware.",
323
+ tags: ["keyboard", "monitor"]
324
+ }
325
+ ];
326
+ const WORKSPACE_SKILLS = () => path.default.join(require_paths.getHyperClawDir(), "workspace", "skills");
327
+ var SkillHub = class {
328
+ installed = /* @__PURE__ */ new Set();
329
+ /** Sync installed set from workspace disk (persisted installs). */
330
+ async refreshInstalledFromDisk() {
331
+ const ids = await listInstalledFromClawHub();
332
+ this.installed = new Set(ids);
333
+ }
334
+ /** Persist bundled skill to workspace so it survives restarts and is loaded by skill-loader. */
335
+ async persistBundledSkill(skill) {
336
+ const destDir = path.default.join(WORKSPACE_SKILLS(), skill.id);
337
+ await fs_extra.default.ensureDir(destDir);
338
+ const skillPath = path.default.join(destDir, "SKILL.md");
339
+ const repoSkillPath = path.default.join(process.cwd(), "skills", skill.id, "SKILL.md");
340
+ const altRepoPath = path.default.join(__dirname, "..", "..", "skills", skill.id, "SKILL.md");
341
+ if (await fs_extra.default.pathExists(repoSkillPath)) await fs_extra.default.copy(repoSkillPath, skillPath);
342
+ else if (await fs_extra.default.pathExists(altRepoPath)) await fs_extra.default.copy(altRepoPath, skillPath);
343
+ else {
344
+ const content = `# ${skill.name}\n\n${skill.description}\n\n## Usage\n\nWhen the user needs ${skill.description.toLowerCase()}, use this skill.${skill.requiresKeys?.length ? `\n\nRequires: ${skill.requiresKeys.join(", ")}` : ""}\n`;
345
+ await fs_extra.default.writeFile(skillPath, content, "utf8");
346
+ }
347
+ this.installed.add(skill.id);
348
+ }
349
+ async showHub(hideSuspicious = false) {
350
+ await this.refreshInstalledFromDisk();
351
+ console.log(chalk.default.bold.cyan("\n╔═══════════════════════════════════════════╗"));
352
+ console.log(chalk.default.bold.cyan("ā•‘ 🧩 HYPERCLAW SKILL HUB ā•‘"));
353
+ console.log(chalk.default.bold.cyan("ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•\n"));
354
+ const skills = hideSuspicious ? SKILL_REGISTRY.filter((s) => s.risk === "clean") : SKILL_REGISTRY;
355
+ for (const skill of skills) this.printSkillCard(skill);
356
+ }
357
+ printSkillCard(skill) {
358
+ const riskBadge = {
359
+ "clean": chalk.default.green("āœ” CLEAN"),
360
+ "suspicious": chalk.default.yellow("⚠ SUSPICIOUS"),
361
+ "dangerous": chalk.default.red("āœ– DANGEROUS")
362
+ }[skill.risk];
363
+ const instBadge = this.installed.has(skill.id) ? chalk.default.green("[installed]") : chalk.default.gray("[available]");
364
+ const stars = "ā˜…".repeat(Math.round(skill.rating)) + "ā˜†".repeat(5 - Math.round(skill.rating));
365
+ console.log(` ${chalk.default.bold(skill.name)} ${chalk.default.gray(`v${skill.version}`)} ${instBadge}`);
366
+ console.log(` ${chalk.default.gray(skill.description)}`);
367
+ console.log(` ${riskBadge} ${chalk.default.yellow(stars)} ${chalk.default.gray(`${(skill.downloads / 1e3).toFixed(1)}k downloads`)}`);
368
+ if (skill.riskReason) console.log(` ${chalk.default.yellow("⚠")} ${chalk.default.yellow(skill.riskReason)}`);
369
+ if (skill.requiresKeys?.length) console.log(` šŸ”‘ Requires: ${chalk.default.cyan(skill.requiresKeys.join(", "))}`);
370
+ console.log();
371
+ }
372
+ async install(skillId, force = false) {
373
+ const skill = SKILL_REGISTRY.find((s) => s.id === skillId);
374
+ if (!skill) {
375
+ console.log(chalk.default.red(`āŒ Skill not found: ${skillId}`));
376
+ return;
377
+ }
378
+ if (skill.risk === "dangerous" && !force) {
379
+ console.log(chalk.default.red(`\n🚨 DANGEROUS SKILL BLOCKED: ${skill.name}`));
380
+ console.log(chalk.default.red(` ${skill.riskReason}`));
381
+ console.log(chalk.default.gray(" Use --force to override (NOT RECOMMENDED)\n"));
382
+ return;
383
+ }
384
+ if (skill.risk === "suspicious" && !force) {
385
+ console.log(chalk.default.yellow(`\nāš ļø SUSPICIOUS SKILL: ${skill.name}`));
386
+ console.log(chalk.default.yellow(` ${skill.riskReason}`));
387
+ console.log(chalk.default.gray(" Use --force to install anyway\n"));
388
+ return;
389
+ }
390
+ const spinner = (0, ora.default)(`Installing ${skill.name}...`).start();
391
+ if (skill.npmPackage) {
392
+ spinner.text = `Installing npm package: ${skill.npmPackage}`;
393
+ await new Promise((r) => setTimeout(r, 800));
394
+ }
395
+ await this.persistBundledSkill(skill);
396
+ spinner.succeed(`${skill.name} installed āœ“`);
397
+ if (skill.requiresKeys?.length) {
398
+ console.log(chalk.default.yellow(`\nšŸ“‹ Required API keys to activate:`));
399
+ skill.requiresKeys.forEach((k) => {
400
+ console.log(chalk.default.cyan(` hyperclaw config set-key ${k}`));
401
+ });
402
+ }
403
+ console.log();
404
+ }
405
+ async scan(skillId) {
406
+ const skill = SKILL_REGISTRY.find((s) => s.id === skillId);
407
+ if (!skill) return;
408
+ const spinner = (0, ora.default)(`Scanning ${skill.name}...`).start();
409
+ const stages = [
410
+ "Checking manifest...",
411
+ "Scanning for malicious patterns...",
412
+ "Checking VirusTotal...",
413
+ "Verifying author..."
414
+ ];
415
+ for (const stage of stages) {
416
+ spinner.text = stage;
417
+ await new Promise((r) => setTimeout(r, 600));
418
+ }
419
+ const result = {
420
+ "clean": chalk.default.green("āœ… All green — safe to install"),
421
+ "suspicious": chalk.default.yellow("āš ļø Suspicious patterns detected — proceed with caution"),
422
+ "dangerous": chalk.default.red("🚨 Malicious patterns detected — do NOT install")
423
+ }[skill.risk];
424
+ spinner.stop();
425
+ console.log(`\nšŸ”¬ Scan results for ${chalk.default.bold(skill.name)}:`);
426
+ console.log(` ${result}`);
427
+ if (skill.riskReason) console.log(chalk.default.gray(` Detail: ${skill.riskReason}`));
428
+ console.log();
429
+ }
430
+ async checkEligibility() {
431
+ const spinner = (0, ora.default)("Checking system eligibility...").start();
432
+ await new Promise((r) => setTimeout(r, 1e3));
433
+ spinner.succeed("Eligibility check complete");
434
+ console.log(chalk.default.green("\nāœ… All installed skills are eligible on this system\n"));
435
+ }
436
+ async getInstalled() {
437
+ await this.refreshInstalledFromDisk();
438
+ const ids = this.installed;
439
+ const fromRegistry = SKILL_REGISTRY.filter((s) => ids.has(s.id));
440
+ const fromWorkspace = (await listInstalledFromClawHub()).filter((id) => !SKILL_REGISTRY.some((s) => s.id === id));
441
+ return [...fromRegistry, ...fromWorkspace.map((id) => ({
442
+ id,
443
+ name: id,
444
+ version: "0",
445
+ description: "",
446
+ author: "",
447
+ category: "utility",
448
+ downloads: 0,
449
+ rating: 0,
450
+ risk: "clean",
451
+ tags: []
452
+ }))];
453
+ }
454
+ /** ClawHub integration: search remote registry, fallback to bundled when remote unavailable */
455
+ async searchClawHub(query, category) {
456
+ let remote = await searchSkills(query, category);
457
+ if (remote.length === 0) {
458
+ const q = (query || "").toLowerCase();
459
+ const filtered = SKILL_REGISTRY.filter((s) => !q || s.id.includes(q) || s.name.toLowerCase().includes(q) || s.tags.some((t) => t.includes(q))).filter((s) => !category || s.category === category);
460
+ remote = filtered.map((s) => ({
461
+ id: s.id,
462
+ name: s.name,
463
+ author: s.author,
464
+ description: s.description,
465
+ rating: s.rating,
466
+ downloads: s.downloads,
467
+ version: s.version,
468
+ categories: [s.category]
469
+ }));
470
+ }
471
+ return remote;
472
+ }
473
+ /** ClawHub integration: install from remote registry */
474
+ async installFromClawHub(skillId, version) {
475
+ return installSkill(skillId, version);
476
+ }
477
+ /** ClawHub marketplace UX: unified browse (bundled + remote) */
478
+ async showMarketplace(opts) {
479
+ await this.refreshInstalledFromDisk();
480
+ const installedClawHub = await listInstalledFromClawHub();
481
+ const bundled = (opts?.hideSuspicious ? SKILL_REGISTRY.filter((s) => s.risk === "clean") : SKILL_REGISTRY).filter((s) => !opts?.category || s.category === opts.category);
482
+ console.log(chalk.default.bold.cyan("\n╔══════════════════════════════════════════════════════════╗"));
483
+ console.log(chalk.default.bold.cyan("ā•‘ 🧩 CLAWHUB MARKETPLACE ā•‘"));
484
+ console.log(chalk.default.bold.cyan("ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•\n"));
485
+ if (installedClawHub.length > 0) {
486
+ console.log(chalk.default.bold.green(" Installed (ClawHub):"));
487
+ installedClawHub.forEach((id) => console.log(chalk.default.gray(` • ${id}`)));
488
+ console.log();
489
+ }
490
+ console.log(chalk.default.bold(" Bundled skills:"));
491
+ for (const skill of bundled) {
492
+ const inst = this.installed.has(skill.id) || installedClawHub.includes(skill.id);
493
+ const badge = inst ? chalk.default.green("āœ“ installed") : chalk.default.cyan("hyperclaw skill install " + skill.id);
494
+ const risk = skill.risk === "clean" ? "" : chalk.default.yellow(` [${skill.risk}]`);
495
+ console.log(` ${chalk.default.bold(skill.name)} ${chalk.default.gray(`v${skill.version}`)} ${badge}${risk}`);
496
+ console.log(chalk.default.gray(` ${skill.description}`));
497
+ }
498
+ console.log(chalk.default.gray("\n Search remote: hyperclaw skill search <query>"));
499
+ console.log(chalk.default.gray(" Install: hyperclaw skill install <id>\n"));
500
+ }
501
+ };
502
+
503
+ //#endregion
504
+ Object.defineProperty(exports, 'SKILL_REGISTRY', {
505
+ enumerable: true,
506
+ get: function () {
507
+ return SKILL_REGISTRY;
508
+ }
509
+ });
510
+ Object.defineProperty(exports, 'SkillHub', {
511
+ enumerable: true,
512
+ get: function () {
513
+ return SkillHub;
514
+ }
515
+ });
@@ -0,0 +1,6 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ require('./paths-AIyBxIzm.js');
3
+ require('./paths-DPovhojT.js');
4
+ const require_hub = require('./hub-D0XwdjM-.js');
5
+
6
+ exports.SkillHub = require_hub.SkillHub;