hyperclaw 5.4.1 → 5.4.2

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 (135) hide show
  1. package/dist/a2ui-protocol-CUqdJGh7.js +75 -0
  2. package/dist/agents-routing-B0D0vcp5.js +424 -0
  3. package/dist/agents-routing-BC6GndVe.js +7 -0
  4. package/dist/agents-routing-CyFBHvyk.js +424 -0
  5. package/dist/agents-routing-DdpszaMx.js +7 -0
  6. package/dist/api-key-validation-DrMrLEa0.js +66 -0
  7. package/dist/api-keys-guide-DmKF7tB-.js +149 -0
  8. package/dist/audit-Q-Uy5nem.js +445 -0
  9. package/dist/backup-CtHJEqGr.js +86 -0
  10. package/dist/banner-DYzQ8cCb.js +143 -0
  11. package/dist/banner-jW84OrYg.js +7 -0
  12. package/dist/bounty-tools-CCwY61YO.js +211 -0
  13. package/dist/chat-CJa0ph8c.js +528 -0
  14. package/dist/chat-CKnfxa1-.js +528 -0
  15. package/dist/chat-CQKCIrIY.js +528 -0
  16. package/dist/chat-npW_ZOmo.js +528 -0
  17. package/dist/claw-tasks-Dq38PrL5.js +80 -0
  18. package/dist/config-BzK_Xl4Y.js +261 -0
  19. package/dist/config-ClsdlpXc.js +261 -0
  20. package/dist/config-Dm394B6X.js +7 -0
  21. package/dist/config-SiLqEezw.js +7 -0
  22. package/dist/connector-BYPxgmsD.js +312 -0
  23. package/dist/cost-tracker-x9E8VKtk.js +103 -0
  24. package/dist/credentials-store-Ddhgmbpz.js +7 -0
  25. package/dist/credentials-store-onL1tYct.js +89 -0
  26. package/dist/cron-tasks-CF4MJoIU.js +89 -0
  27. package/dist/daemon-ApB1nMs2.js +421 -0
  28. package/dist/daemon-B2ghXB-I.js +7 -0
  29. package/dist/daemon-BldYSrDj.js +421 -0
  30. package/dist/daemon-BqTcxMZe.js +7 -0
  31. package/dist/daemon-CivMFYkD.js +7 -0
  32. package/dist/daemon-DBXFUMue.js +421 -0
  33. package/dist/delivery-BURWi8wu.js +4 -0
  34. package/dist/delivery-kZ2mVkU5.js +95 -0
  35. package/dist/destructive-gate-C1ny9ek2.js +116 -0
  36. package/dist/engine-B-JvIt_Y.js +7 -0
  37. package/dist/engine-BGZnBZ4m.js +7 -0
  38. package/dist/engine-BTSXJNba.js +346 -0
  39. package/dist/engine-C7LyH310.js +353 -0
  40. package/dist/engine-C_nC_Ioe.js +351 -0
  41. package/dist/engine-DCtJSbKU.js +7 -0
  42. package/dist/env-resolve-C0R8R7pb.js +167 -0
  43. package/dist/env-resolve-Dr-KfTtw.js +11 -0
  44. package/dist/gmail-watch-setup-BzbG0ICM.js +42 -0
  45. package/dist/heartbeat-engine-B9bhAHNi.js +89 -0
  46. package/dist/hyperclawbot-BEm8_87h.js +516 -0
  47. package/dist/hyperclawbot-DR6BgI_d.js +516 -0
  48. package/dist/hyperclawbot-hZv4pde0.js +516 -0
  49. package/dist/inference-C874-2MI.js +8 -0
  50. package/dist/inference-DCSz6Sb1.js +2880 -0
  51. package/dist/knowledge-graph-BiIvoxPt.js +134 -0
  52. package/dist/loader-DMMb9emn.js +410 -0
  53. package/dist/loader-JktrmJOG.js +6 -0
  54. package/dist/logger-Oty9sC13.js +86 -0
  55. package/dist/manager-BIc6zzZV.js +250 -0
  56. package/dist/manager-BwobWy0l.js +120 -0
  57. package/dist/mcp-CI2F3m8G.js +142 -0
  58. package/dist/mcp-loader-C-21ynRH.js +93 -0
  59. package/dist/mcp-loader-Di7n__ta.js +93 -0
  60. package/dist/memory-auto-BVCJeTwd.js +306 -0
  61. package/dist/memory-auto-DXKe2ayf.js +5 -0
  62. package/dist/memory-integration-D2RvZ-MB.js +91 -0
  63. package/dist/moltbook-DvV6GFFL.js +81 -0
  64. package/dist/node-DFKhz7Zn.js +251 -0
  65. package/dist/node-pending-queue-CIMXPU6K.js +32 -0
  66. package/dist/nodes-registry-BeiEjd9U.js +52 -0
  67. package/dist/oauth-flow-CZOsvU1v.js +148 -0
  68. package/dist/oauth-provider-Dk-6BmGL.js +111 -0
  69. package/dist/observability-B3dDQSdI.js +89 -0
  70. package/dist/onboard-BnyHie0K.js +14 -0
  71. package/dist/onboard-D-5gWzH0.js +3854 -0
  72. package/dist/onboard-D9pjgaVR.js +3854 -0
  73. package/dist/onboard-UhWVcTap.js +14 -0
  74. package/dist/onboard-W5DsxVf2.js +3854 -0
  75. package/dist/onboard-YszvVNgS.js +14 -0
  76. package/dist/onboard-pLDBUBpO.js +14 -0
  77. package/dist/onboard-zISipu-l.js +3854 -0
  78. package/dist/orchestrator-C0t11xj7.js +189 -0
  79. package/dist/orchestrator-CA4eKeGn.js +189 -0
  80. package/dist/orchestrator-CNxTIlOK.js +189 -0
  81. package/dist/orchestrator-Cg1vgEHb.js +6 -0
  82. package/dist/orchestrator-DV5t6wQ0.js +6 -0
  83. package/dist/orchestrator-eT0ZL4yl.js +6 -0
  84. package/dist/osint-47yIek6w.js +283 -0
  85. package/dist/osint-c-xDjLb-.js +283 -0
  86. package/dist/osint-chat-BJgnkFDm.js +789 -0
  87. package/dist/osint-chat-C09BvbGy.js +789 -0
  88. package/dist/osint-chat-zdeaaw7a.js +789 -0
  89. package/dist/osint-e6oBrtlj.js +283 -0
  90. package/dist/pending-approval-CEu_-DGQ.js +22 -0
  91. package/dist/providers-BfW-fgpw.js +5 -0
  92. package/dist/providers-Cs1h_TJA.js +1137 -0
  93. package/dist/renderer-B_ew6jRs.js +228 -0
  94. package/dist/rules-BAYXiKiJ.js +106 -0
  95. package/dist/run-main.js +112 -77
  96. package/dist/runner-B5uo6C5q.js +1310 -0
  97. package/dist/search-tools-DXVuVXW_.js +107 -0
  98. package/dist/server-BJkDIs8Z.js +1467 -0
  99. package/dist/server-CtFoXM88.js +4 -0
  100. package/dist/server-DVxVLu_G.js +1467 -0
  101. package/dist/server-DZj6Nobr.js +1467 -0
  102. package/dist/server-Diu80smx.js +4 -0
  103. package/dist/server-DszV63tu.js +4 -0
  104. package/dist/skill-runtime-BLkXA1mO.js +104 -0
  105. package/dist/skill-runtime-BMk-h6Dl.js +5 -0
  106. package/dist/skill-runtime-BaTX-RGy.js +5 -0
  107. package/dist/skill-runtime-CB9tnc-P.js +104 -0
  108. package/dist/skill-runtime-D6-rGzX1.js +104 -0
  109. package/dist/skill-runtime-Dej1Yr5V.js +5 -0
  110. package/dist/src-6dmkVQGq.js +63 -0
  111. package/dist/src-7yBXPAs6.js +315 -0
  112. package/dist/src-BOnuFlI4.js +23 -0
  113. package/dist/src-BkEtHLLy.js +462 -0
  114. package/dist/src-CDeWGebw.js +315 -0
  115. package/dist/src-CNAVUFC6.js +462 -0
  116. package/dist/src-DB6dPsbY.js +63 -0
  117. package/dist/src-DE4mH0BB.js +63 -0
  118. package/dist/src-krHV0uVj.js +315 -0
  119. package/dist/src-tF0sBtr3.js +462 -0
  120. package/dist/sub-agent-tools-BwOxHu6f.js +39 -0
  121. package/dist/sub-agent-tools-CJVEIF1F.js +39 -0
  122. package/dist/sub-agent-tools-f4X1M-li.js +39 -0
  123. package/dist/tool-policy-CfWEnRxy.js +190 -0
  124. package/dist/tts-elevenlabs-CCeOqqrh.js +64 -0
  125. package/dist/vision-BMRKyu3c.js +167 -0
  126. package/dist/vision-tools-DVYx9-Jw.js +5 -0
  127. package/dist/vision-tools-kYb3effk.js +51 -0
  128. package/dist/voice-transcription-B1D1rpca.js +170 -0
  129. package/package.json +1 -1
  130. package/static/chat.html +18 -4
  131. package/static/web/assets/index-D2ekZ-uM.js +75 -0
  132. package/static/web/assets/index-D_9lvvup.css +1 -0
  133. package/static/web/index.html +2 -2
  134. package/static/web/assets/index-8bDizzaq.js +0 -75
  135. package/static/web/assets/index-B5N1LHGR.css +0 -1
@@ -0,0 +1,211 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ const require_env_resolve = require('./env-resolve-C0R8R7pb.js');
3
+ const https = require_chunk.__toESM(require("https"));
4
+
5
+ //#region packages/core/src/agent/bounty-tools.ts
6
+ function fetchJson(url, auth) {
7
+ return new Promise((resolve, reject) => {
8
+ const u = new URL(url);
9
+ const opts = {
10
+ hostname: u.hostname,
11
+ port: 443,
12
+ path: u.pathname + u.search,
13
+ method: "GET",
14
+ headers: { "Accept": "application/json" }
15
+ };
16
+ if (auth) {
17
+ const h = opts.headers;
18
+ if (auth.startsWith("Basic ") || auth.startsWith("Token ") || auth.startsWith("Bearer ")) h["Authorization"] = auth;
19
+ else h["Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
20
+ }
21
+ https.default.get(opts, (res) => {
22
+ let data = "";
23
+ res.on("data", (c) => data += c);
24
+ res.on("end", () => {
25
+ try {
26
+ resolve(JSON.parse(data || "{}"));
27
+ } catch {
28
+ resolve({});
29
+ }
30
+ });
31
+ }).on("error", reject);
32
+ });
33
+ }
34
+ function getBountyTools(cfg) {
35
+ const hackeroneKey = require_env_resolve.resolveServiceApiKey("hackerone", cfg);
36
+ const bugcrowdKey = require_env_resolve.resolveServiceApiKey("bugcrowd", cfg);
37
+ const synackKey = require_env_resolve.resolveServiceApiKey("synack", cfg);
38
+ const tools = [];
39
+ if (hackeroneKey) tools.push({
40
+ name: "hackerone_list_programs",
41
+ description: "List HackerOne programs you have access to. Use for bug bounty research.",
42
+ input_schema: {
43
+ type: "object",
44
+ properties: { limit: {
45
+ type: "string",
46
+ description: "Max programs (default 20)"
47
+ } }
48
+ },
49
+ handler: async (input) => {
50
+ try {
51
+ const auth = Buffer.from(hackeroneKey.includes(":") ? hackeroneKey : `:${hackeroneKey}`).toString("base64");
52
+ const body = await fetchJson("https://api.hackerone.com/v1/hackers/programs", `Basic ${auth}`);
53
+ const progs = body.data || [];
54
+ const limit = parseInt(input.limit || "20", 10);
55
+ return progs.slice(0, limit).map((p) => {
56
+ const attrs = p.attributes;
57
+ return `- ${attrs?.name || p.id} (${attrs?.state || "?"})`;
58
+ }).join("\n") || "No programs found.";
59
+ } catch (e) {
60
+ return `Error: ${e.message}. Check HackerOne API key (username:token).`;
61
+ }
62
+ }
63
+ });
64
+ if (bugcrowdKey) tools.push({
65
+ name: "bugcrowd_list_programs",
66
+ description: "List Bugcrowd programs. Use for bug bounty research.",
67
+ input_schema: {
68
+ type: "object",
69
+ properties: { limit: {
70
+ type: "string",
71
+ description: "Max programs (default 20)"
72
+ } }
73
+ },
74
+ handler: async (input) => {
75
+ try {
76
+ const auth = bugcrowdKey.startsWith("Token ") ? bugcrowdKey : `Token ${bugcrowdKey}`;
77
+ const body = await fetchJson("https://api.bugcrowd.com/programs", auth);
78
+ const progs = (body && typeof body === "object" && "data" in body ? body.data : body) || [];
79
+ const arr = Array.isArray(progs) ? progs : [progs];
80
+ const limit = parseInt(input.limit || "20", 10);
81
+ return arr.slice(0, limit).map((p) => {
82
+ const attrs = p.attributes;
83
+ const name = attrs?.name || p.name || p.id || "?";
84
+ const links = p.links;
85
+ const linkUrl = links?.self || p.url || "";
86
+ return `- ${name} ${linkUrl ? `(${linkUrl})` : ""}`;
87
+ }).join("\n") || JSON.stringify(body).slice(0, 500);
88
+ } catch (e) {
89
+ return `Error: ${e.message}. Check Bugcrowd API token.`;
90
+ }
91
+ }
92
+ });
93
+ if (synackKey) tools.push({
94
+ name: "synack_list_targets",
95
+ description: "List Synack targets you have access to. Use for bug bounty research.",
96
+ input_schema: {
97
+ type: "object",
98
+ properties: {}
99
+ },
100
+ handler: async () => {
101
+ try {
102
+ const body = await fetchJson("https://api.synack.com/api/targets", `Bearer ${synackKey}`);
103
+ const targets = body.targets || body || [];
104
+ const arr = Array.isArray(targets) ? targets : [targets];
105
+ return arr.slice(0, 20).map((t) => `- ${t.name || t.slug || t.id || "?"}`).join("\n") || "No targets or check Synack API.";
106
+ } catch (e) {
107
+ return `Error: ${e.message}. Check Synack API token.`;
108
+ }
109
+ }
110
+ });
111
+ const apiKeys = cfg?.skills?.apiKeys ?? {};
112
+ const genericServiceIds = Object.keys(apiKeys).filter((id) => !KNOWN_BOUNTY_SERVICES.includes(id.toLowerCase()));
113
+ if (genericServiceIds.length > 0) tools.push({
114
+ name: "call_service_api",
115
+ description: `Call external API for services with configured keys. Available: ${genericServiceIds.join(", ")}. Use when the user needs to query an API for a service they've added (Stripe, GitHub, custom APIs, etc).`,
116
+ input_schema: {
117
+ type: "object",
118
+ properties: {
119
+ service_id: {
120
+ type: "string",
121
+ description: `Service id from configured keys: ${genericServiceIds.join(", ")}`
122
+ },
123
+ url: {
124
+ type: "string",
125
+ description: "Full API URL (e.g. https://api.example.com/v1/resource) or path if baseUrl configured"
126
+ },
127
+ method: {
128
+ type: "string",
129
+ description: "HTTP method",
130
+ enum: [
131
+ "GET",
132
+ "POST",
133
+ "PUT",
134
+ "PATCH",
135
+ "DELETE"
136
+ ]
137
+ },
138
+ body: {
139
+ type: "object",
140
+ description: "Request body for POST/PUT/PATCH (optional)"
141
+ }
142
+ },
143
+ required: ["service_id", "url"]
144
+ },
145
+ handler: async (input) => {
146
+ const serviceId = String(input.service_id || "").trim().toLowerCase();
147
+ const url = String(input.url || "");
148
+ const method = String(input.method || "GET").toUpperCase();
149
+ const key = require_env_resolve.resolveServiceApiKey(serviceId, cfg);
150
+ if (!key) return `Error: No API key for service "${serviceId}". Configure via: hyperclaw config set-service-key ${serviceId} <key>`;
151
+ if (!url || !url.startsWith("http")) return "Error: url must be a full URL (https://...).";
152
+ try {
153
+ const body = await genericHttpRequest(url, method, key, input.body);
154
+ return typeof body === "string" ? body : JSON.stringify(body, null, 2).slice(0, 8e3);
155
+ } catch (e) {
156
+ return `Error: ${e.message}`;
157
+ }
158
+ }
159
+ });
160
+ return tools;
161
+ }
162
+ function genericHttpRequest(url, method, apiKey, body) {
163
+ return new Promise((resolve, reject) => {
164
+ const u = new URL(url);
165
+ const authHeader = apiKey.startsWith("Bearer ") || apiKey.startsWith("Token ") || apiKey.startsWith("Basic ") ? apiKey : `Bearer ${apiKey}`;
166
+ const bodyStr = body && method !== "GET" ? JSON.stringify(body) : void 0;
167
+ const opts = {
168
+ hostname: u.hostname,
169
+ port: u.port || 443,
170
+ path: u.pathname + u.search,
171
+ method,
172
+ headers: {
173
+ "Accept": "application/json",
174
+ "Authorization": authHeader,
175
+ ...bodyStr ? {
176
+ "Content-Type": "application/json",
177
+ "Content-Length": Buffer.byteLength(bodyStr)
178
+ } : {}
179
+ }
180
+ };
181
+ const req = https.default.request(opts, (res) => {
182
+ let data = "";
183
+ res.on("data", (c) => {
184
+ data += c.toString();
185
+ });
186
+ res.on("end", () => {
187
+ try {
188
+ resolve(JSON.parse(data || "{}"));
189
+ } catch {
190
+ resolve(data || "{}");
191
+ }
192
+ });
193
+ });
194
+ req.on("error", reject);
195
+ if (bodyStr) req.write(bodyStr);
196
+ req.end();
197
+ });
198
+ }
199
+ var KNOWN_BOUNTY_SERVICES;
200
+ var init_bounty_tools = require_chunk.__esm({ "packages/core/src/agent/bounty-tools.ts"() {
201
+ require_env_resolve.init_env_resolve();
202
+ KNOWN_BOUNTY_SERVICES = [
203
+ "hackerone",
204
+ "bugcrowd",
205
+ "synack"
206
+ ];
207
+ } });
208
+
209
+ //#endregion
210
+ init_bounty_tools();
211
+ exports.getBountyTools = getBountyTools;