hyperclaw 5.2.8 → 5.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 (160) hide show
  1. package/dist/a2ui-protocol-DEsfqO7h.js +75 -0
  2. package/dist/agents-routing-ChorJKFL.js +6 -0
  3. package/dist/agents-routing-Cpg20-1e.js +398 -0
  4. package/dist/api-key-validation-DgOBmp8Y.js +64 -0
  5. package/dist/api-keys-guide--73Bq0Ey.js +149 -0
  6. package/dist/audit-Dntx9fG9.js +445 -0
  7. package/dist/banner-B_rR7FPO.js +7 -0
  8. package/dist/banner-Bb7CderS.js +143 -0
  9. package/dist/banner-BbUkjcoX.js +7 -0
  10. package/dist/banner-DupxNjxh.js +143 -0
  11. package/dist/bounty-tools-Dn9Yq7V1.js +211 -0
  12. package/dist/browser-tools-CJ9M9o22.js +179 -0
  13. package/dist/browser-tools-CXxWxA1c.js +5 -0
  14. package/dist/chat-D1Zc73I5.js +513 -0
  15. package/dist/chat-TGA-UO46.js +536 -0
  16. package/dist/claw-tasks-ChqkHdFs.js +80 -0
  17. package/dist/config-Bzues-G2.js +7 -0
  18. package/dist/config-DGAAJ49A.js +261 -0
  19. package/dist/connector-1efnZgQN.js +566 -0
  20. package/dist/connector-B5q1_srT.js +286 -0
  21. package/dist/connector-BMFLJ4fr.js +508 -0
  22. package/dist/connector-BZYv9siY.js +189 -0
  23. package/dist/connector-B_XkXm-j.js +218 -0
  24. package/dist/connector-BkY1I6gf.js +189 -0
  25. package/dist/connector-C2Z3RN1z.js +350 -0
  26. package/dist/connector-C7aYvVzU.js +225 -0
  27. package/dist/connector-CXXYOyHw.js +164 -0
  28. package/dist/connector-Ca1J23HX.js +167 -0
  29. package/dist/connector-Cjqc656I.js +181 -0
  30. package/dist/connector-CluRienN.js +425 -0
  31. package/dist/connector-CuNz2eP-.js +305 -0
  32. package/dist/connector-DHL_oeHy.js +552 -0
  33. package/dist/connector-DJ79rd1L.js +173 -0
  34. package/dist/connector-DcLE6xCZ.js +239 -0
  35. package/dist/connector-DcyQTJnJ.js +162 -0
  36. package/dist/connector-DgyX9qSc.js +192 -0
  37. package/dist/connector-DnDXXZ7L.js +182 -0
  38. package/dist/connector-DqUslg-X.js +213 -0
  39. package/dist/connector-Duc-HmRZ.js +85 -0
  40. package/dist/connector-IV0QFer8.js +498 -0
  41. package/dist/connector-OnsLxE8G.js +194 -0
  42. package/dist/connector-UYu_TS0X.js +204 -0
  43. package/dist/connector-cCA5ffmp.js +340 -0
  44. package/dist/connector-fbNfx4_L.js +568 -0
  45. package/dist/connector-fi2vlwbO.js +276 -0
  46. package/dist/connector-l3LD8IDN.js +419 -0
  47. package/dist/cost-tracker-DCXDUzBI.js +103 -0
  48. package/dist/credentials-store-Bmm9e1SS.js +7 -0
  49. package/dist/credentials-store-D8ERbGR2.js +89 -0
  50. package/dist/cron-tasks-OQbgmenS.js +85 -0
  51. package/dist/daemon-BgT541y-.js +421 -0
  52. package/dist/daemon-aVX-WGz1.js +421 -0
  53. package/dist/daemon-iFmVBPXN.js +7 -0
  54. package/dist/daemon-iM7U3tDr.js +7 -0
  55. package/dist/delivery-Pko6sSkt.js +4 -0
  56. package/dist/delivery-hMHFRZwy.js +95 -0
  57. package/dist/destructive-gate-C2TrWsp2.js +101 -0
  58. package/dist/developer-keys-BWXHaWxY.js +127 -0
  59. package/dist/developer-keys-CzDxVczE.js +8 -0
  60. package/dist/device-auth-store-C1bCwXO2.js +7 -0
  61. package/dist/device-auth-store-DIZTOz4V.js +88 -0
  62. package/dist/doctor-C6nAGdH8.js +233 -0
  63. package/dist/doctor-mgWumA25.js +6 -0
  64. package/dist/engine-BGRTi0fo.js +327 -0
  65. package/dist/engine-BrDEACit.js +327 -0
  66. package/dist/engine-BvCEhaUn.js +7 -0
  67. package/dist/engine-DrsMsoLZ.js +7 -0
  68. package/dist/env-resolve-CHxjGo8u.js +151 -0
  69. package/dist/env-resolve-pIETNTpQ.js +10 -0
  70. package/dist/extraction-tools-BE6z_Yw5.js +91 -0
  71. package/dist/extraction-tools-CJsdyBST.js +5 -0
  72. package/dist/form_data-B2_0EoWj.js +8657 -0
  73. package/dist/gmail-watch-setup-1RGIHNdu.js +42 -0
  74. package/dist/health-BMUmUNoe.js +152 -0
  75. package/dist/health-C8n9RH5O.js +6 -0
  76. package/dist/heartbeat-engine-aRbab8a5.js +89 -0
  77. package/dist/hub-BJM2KXLO.js +6 -0
  78. package/dist/hub-Bb_dYECE.js +512 -0
  79. package/dist/hyperclawbot-CZ4DjvO-.js +516 -0
  80. package/dist/hyperclawbot-CgrV46DA.js +516 -0
  81. package/dist/inference-CFBkvLpE.js +2854 -0
  82. package/dist/inference-G4MbdErG.js +8 -0
  83. package/dist/knowledge-graph-9UNrsiIY.js +134 -0
  84. package/dist/loader-DIPs649t.js +410 -0
  85. package/dist/loader-Dq_cDlOW.js +6 -0
  86. package/dist/logger-CG38Idq4.js +86 -0
  87. package/dist/manager--wG9JdFW.js +120 -0
  88. package/dist/manager-BNc21xgG.js +6 -0
  89. package/dist/manager-DWJ7WZcY.js +250 -0
  90. package/dist/manager-DYfzqckn.js +35 -0
  91. package/dist/mcp-SsMEvl28.js +142 -0
  92. package/dist/mcp-loader-CVhiejBN.js +93 -0
  93. package/dist/mcp-loader-DLrp_oZJ.js +93 -0
  94. package/dist/memory-BCYvdqwo.js +273 -0
  95. package/dist/memory-BGgCBSx1.js +6 -0
  96. package/dist/memory-auto-Bh52cQJP.js +5 -0
  97. package/dist/memory-auto-BupvVwNd.js +306 -0
  98. package/dist/memory-integration-4oGqX6rr.js +91 -0
  99. package/dist/moltbook-B3DNdh40.js +81 -0
  100. package/dist/node-C4esBfbX.js +226 -0
  101. package/dist/nodes-registry-DLUZhEMS.js +52 -0
  102. package/dist/oauth-flow-BbLQTzZk.js +148 -0
  103. package/dist/oauth-provider-UZyG84s7.js +111 -0
  104. package/dist/observability-BtLyuxcz.js +89 -0
  105. package/dist/onboard-B3drurt-.js +3812 -0
  106. package/dist/onboard-CSJuvkMN.js +14 -0
  107. package/dist/onboard-DEwuHrMj.js +14 -0
  108. package/dist/onboard-eIxjVYKi.js +3812 -0
  109. package/dist/orchestrator-BXyIgAeH.js +189 -0
  110. package/dist/orchestrator-Cgj-8BbJ.js +189 -0
  111. package/dist/orchestrator-MLTc4NYu.js +6 -0
  112. package/dist/orchestrator-PLHfNTD6.js +6 -0
  113. package/dist/osint-Bsf6RGPv.js +283 -0
  114. package/dist/osint-CMyamX3_.js +283 -0
  115. package/dist/osint-chat-Ark94iFc.js +789 -0
  116. package/dist/osint-chat-D_6Fb27C.js +789 -0
  117. package/dist/pairing-2vAiDBjN.js +6 -0
  118. package/dist/pairing-B4NoBvyE.js +207 -0
  119. package/dist/pc-access-BLnc-DYp.js +858 -0
  120. package/dist/pc-access-CTNtG2LD.js +8 -0
  121. package/dist/pending-approval-C4ZaHHWl.js +22 -0
  122. package/dist/reminders-store-BixTWL1h.js +58 -0
  123. package/dist/renderer-B1ToXngl.js +228 -0
  124. package/dist/rules-Cqen1Mpt.js +106 -0
  125. package/dist/run-main.js +101 -95
  126. package/dist/runner-Cr1_mwnU.js +1274 -0
  127. package/dist/security-B4vH02lO.js +4 -0
  128. package/dist/security-HOOGCw5z.js +90 -0
  129. package/dist/server-B9rMYJwV.js +4 -0
  130. package/dist/server-CRhXiGI9.js +4 -0
  131. package/dist/server-DMC1wOsc.js +1365 -0
  132. package/dist/server-De4H45Ju.js +1365 -0
  133. package/dist/session-store-7sEPyV16.js +5 -0
  134. package/dist/session-store-Ce2QMSL_.js +141 -0
  135. package/dist/sessions-tools-CWr_pDtp.js +5 -0
  136. package/dist/sessions-tools-DKVu9aIN.js +95 -0
  137. package/dist/skill-loader-DK19Jm4e.js +7 -0
  138. package/dist/skill-loader-Dfs9VNM-.js +160 -0
  139. package/dist/skill-runtime-BeKh2rD_.js +5 -0
  140. package/dist/skill-runtime-CcpC2Zfc.js +104 -0
  141. package/dist/skill-runtime-CzsUymMA.js +104 -0
  142. package/dist/skill-runtime-DAP0Gs_7.js +5 -0
  143. package/dist/src-BxmkZ9RH.js +63 -0
  144. package/dist/src-CvJOtJlj.js +458 -0
  145. package/dist/src-DjTtmSRg.js +20 -0
  146. package/dist/src-cowbRb9x.js +63 -0
  147. package/dist/src-n_46LPDi.js +458 -0
  148. package/dist/sub-agent-tools-CIA8mqjv.js +39 -0
  149. package/dist/sub-agent-tools-q5JqEze_.js +39 -0
  150. package/dist/tool-policy-QXF3MMxu.js +189 -0
  151. package/dist/tts-elevenlabs-y6HGWWDS.js +64 -0
  152. package/dist/update-check-C4te7JmY.js +6 -0
  153. package/dist/update-check-GDue_it1.js +98 -0
  154. package/dist/vision-tools-CbVfyTZT.js +5 -0
  155. package/dist/vision-tools-DieVQp6s.js +51 -0
  156. package/dist/vision-u4kMThdo.js +167 -0
  157. package/dist/voice-transcription-DgON5qaF.js +170 -0
  158. package/dist/website-watch-tools-B8L_NgwT.js +5 -0
  159. package/dist/website-watch-tools-Drm5HjIX.js +176 -0
  160. package/package.json +1 -1
@@ -0,0 +1,261 @@
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 require_env_resolve = require('./env-resolve-CHxjGo8u.js');
5
+ const chalk = require_chunk.__toESM(require("chalk"));
6
+ const fs_extra = require_chunk.__toESM(require("fs-extra"));
7
+
8
+ //#region src/cli/config.ts
9
+ require_paths$1.init_paths();
10
+ require_env_resolve.init_env_resolve();
11
+ const getHC_DIR = () => require_paths.getHyperClawDir();
12
+ const getCFG_FILE = () => require_paths.getConfigPath();
13
+ var ConfigStore = class {
14
+ /** Load raw config from disk (no hydration). Use for persistence to avoid writing resolved secrets back. */
15
+ async loadRaw() {
16
+ try {
17
+ return await fs_extra.default.readJson(getCFG_FILE());
18
+ } catch (e) {
19
+ if (e?.code === "ENOENT") return {};
20
+ console.error("[config] Failed to load config:", e?.message ?? String(e));
21
+ throw e;
22
+ }
23
+ }
24
+ /** Load config with env/credentials hydration for runtime use. Do NOT pass the result to save — use patch/save with explicit values only. */
25
+ async load() {
26
+ try {
27
+ const cfg = await fs_extra.default.readJson(getCFG_FILE());
28
+ if (cfg.channelConfigs) for (const [chId, ch] of Object.entries(cfg.channelConfigs)) {
29
+ const tok = require_env_resolve.resolveChannelToken(chId, ch?.token || ch?.botToken);
30
+ if (tok && !ch?.token) ch.token = tok;
31
+ if (tok && !ch?.botToken) ch.botToken = tok;
32
+ }
33
+ if (cfg.provider && !cfg.provider.apiKey) {
34
+ const key = await require_env_resolve.getProviderCredentialAsync(cfg);
35
+ if (key) cfg.provider.apiKey = key;
36
+ }
37
+ return cfg;
38
+ } catch (e) {
39
+ if (e?.code === "ENOENT") return {};
40
+ console.error("[config] Failed to load config:", e?.message ?? String(e));
41
+ throw e;
42
+ }
43
+ }
44
+ async save(cfg) {
45
+ const target = getCFG_FILE();
46
+ const tmp = target + ".tmp";
47
+ await fs_extra.default.ensureDir(getHC_DIR());
48
+ await fs_extra.default.writeJson(tmp, cfg, { spaces: 2 });
49
+ await fs_extra.default.chmod(tmp, 384);
50
+ await fs_extra.default.rename(tmp, target);
51
+ }
52
+ /** Merge patch into raw config and save. Uses loadRaw() so hydrated secrets from env/store are never written back. */
53
+ async patch(patch) {
54
+ const raw = await this.loadRaw();
55
+ await this.save(deepMerge(raw, patch));
56
+ }
57
+ async setProviderKey(providerId, apiKey) {
58
+ const cfg = await this.load();
59
+ await this.patch({ provider: {
60
+ ...cfg.provider,
61
+ providerId,
62
+ apiKey
63
+ } });
64
+ console.log(chalk.default.green(` ✅ API key saved for ${providerId}`));
65
+ }
66
+ async setModel(modelId) {
67
+ const cfg = await this.load();
68
+ await this.patch({ provider: {
69
+ ...cfg.provider,
70
+ modelId
71
+ } });
72
+ console.log(chalk.default.green(` ✅ Model: ${modelId}`));
73
+ }
74
+ async setServiceApiKey(serviceId, apiKey) {
75
+ const cfg = await this.load();
76
+ const apiKeys = {
77
+ ...cfg.skills?.apiKeys || {},
78
+ [serviceId]: apiKey
79
+ };
80
+ await this.patch({ skills: {
81
+ ...cfg.skills,
82
+ installed: cfg.skills?.installed || [],
83
+ apiKeys
84
+ } });
85
+ console.log(chalk.default.green(` ✅ Service API key saved for ${serviceId}`));
86
+ }
87
+ async enableChannel(channelId, channelConfig) {
88
+ const cfg = await this.load();
89
+ const gwBase = cfg.gateway ?? {
90
+ port: 18789,
91
+ bind: "127.0.0.1",
92
+ authToken: "",
93
+ runtime: "node",
94
+ enabledChannels: [],
95
+ hooks: true,
96
+ tailscaleExposure: "off"
97
+ };
98
+ const channels = gwBase.enabledChannels ?? [];
99
+ if (!channels.includes(channelId)) channels.push(channelId);
100
+ const patch = { gateway: {
101
+ ...gwBase,
102
+ enabledChannels: channels
103
+ } };
104
+ if (channelConfig) patch.channelConfigs = {
105
+ ...cfg.channelConfigs,
106
+ [channelId]: channelConfig
107
+ };
108
+ await this.patch(patch);
109
+ console.log(chalk.default.green(` ✅ Channel enabled: ${channelId}`));
110
+ }
111
+ async disableChannel(channelId) {
112
+ const cfg = await this.load();
113
+ const gwBase = cfg.gateway ?? {
114
+ port: 18789,
115
+ bind: "127.0.0.1",
116
+ authToken: "",
117
+ runtime: "node",
118
+ enabledChannels: [],
119
+ hooks: true,
120
+ tailscaleExposure: "off"
121
+ };
122
+ const channels = (gwBase.enabledChannels ?? []).filter((c) => c !== channelId);
123
+ await this.patch({ gateway: {
124
+ ...gwBase,
125
+ enabledChannels: channels
126
+ } });
127
+ console.log(chalk.default.green(` ✅ Channel disabled: ${channelId}`));
128
+ }
129
+ async setGatewayPort(port) {
130
+ const cfg = await this.load();
131
+ const gwBase = cfg.gateway ?? {
132
+ port: 18789,
133
+ bind: "127.0.0.1",
134
+ authToken: "",
135
+ runtime: "node",
136
+ enabledChannels: [],
137
+ hooks: true,
138
+ tailscaleExposure: "off"
139
+ };
140
+ await this.patch({ gateway: {
141
+ ...gwBase,
142
+ port
143
+ } });
144
+ }
145
+ async setGatewayBind(bind) {
146
+ const cfg = await this.load();
147
+ const gwBase = cfg.gateway ?? {
148
+ port: 18789,
149
+ bind: "127.0.0.1",
150
+ authToken: "",
151
+ runtime: "node",
152
+ enabledChannels: [],
153
+ hooks: true,
154
+ tailscaleExposure: "off"
155
+ };
156
+ await this.patch({ gateway: {
157
+ ...gwBase,
158
+ bind
159
+ } });
160
+ }
161
+ async generateToken() {
162
+ const token = require("crypto").randomBytes(32).toString("base64url");
163
+ const cfg = await this.load();
164
+ const gwBase = cfg.gateway ?? {
165
+ port: 18789,
166
+ bind: "127.0.0.1",
167
+ authToken: "",
168
+ runtime: "node",
169
+ enabledChannels: [],
170
+ hooks: true,
171
+ tailscaleExposure: "off"
172
+ };
173
+ await this.patch({ gateway: {
174
+ ...gwBase,
175
+ authToken: token
176
+ } });
177
+ return token;
178
+ }
179
+ async show(scrub = true) {
180
+ const cfg = await this.load();
181
+ const display = scrub ? scrubSecrets(cfg) : cfg;
182
+ console.log(chalk.default.bold.cyan("\n 🦅 HYPERCLAW CONFIGURATION\n"));
183
+ printSection("Provider", display.provider);
184
+ printSection("Gateway", display.gateway);
185
+ printSection("Identity", display.identity);
186
+ printSection("PC Access", display.pcAccess);
187
+ if (display.channelConfigs && Object.keys(display.channelConfigs).length > 0) {
188
+ console.log(chalk.default.bold.white(" Channel Configs:"));
189
+ for (const [ch, v] of Object.entries(display.channelConfigs)) {
190
+ const scrubbed = scrubChannelConfig(v);
191
+ console.log(` ${chalk.default.cyan(ch)}: ${JSON.stringify(scrubbed).slice(0, 80)}`);
192
+ }
193
+ console.log();
194
+ }
195
+ if (display.skills?.installed?.length) {
196
+ console.log(chalk.default.bold.white(" Skills:"));
197
+ display.skills.installed.forEach((s) => console.log(` • ${s}`));
198
+ console.log();
199
+ }
200
+ console.log(chalk.default.gray(` Config file: ${getCFG_FILE()}`));
201
+ console.log();
202
+ }
203
+ };
204
+ function deepMerge(base, patch) {
205
+ const result = { ...base };
206
+ for (const key of Object.keys(patch || {})) {
207
+ if (patch[key] === void 0) continue;
208
+ if (patch[key] !== null && typeof patch[key] === "object" && !Array.isArray(patch[key])) result[key] = deepMerge(base[key] || {}, patch[key]);
209
+ else result[key] = patch[key];
210
+ }
211
+ return result;
212
+ }
213
+ function scrubSecrets(cfg) {
214
+ const s = JSON.parse(JSON.stringify(cfg));
215
+ if (s.provider?.apiKey) s.provider.apiKey = "●●●●●●●●";
216
+ if (Array.isArray(s.providers)) for (const p of s.providers) {
217
+ if (p.apiKey) p.apiKey = "●●●●●●●●";
218
+ if (Array.isArray(p.apiKeys)) p.apiKeys = p.apiKeys.map(() => "●●●●●●●●");
219
+ }
220
+ if (s.gateway?.authToken) s.gateway.authToken = "●●●●●●●●";
221
+ if (s.gateway?.remote?.token) s.gateway.remote.token = "●●●●●●●●";
222
+ if (s.gateway?.remote?.password) s.gateway.remote.password = "●●●●●●●●";
223
+ if (s.talkMode?.apiKey) s.talkMode.apiKey = "●●●●●●●●";
224
+ if (s.skills?.apiKeys) {
225
+ const keys = Object.keys(s.skills.apiKeys);
226
+ s.skills.apiKeys = Object.fromEntries(keys.map((k) => [k, "●●●●●●●●"]));
227
+ }
228
+ return s;
229
+ }
230
+ function scrubChannelConfig(ch) {
231
+ const s = { ...ch };
232
+ const secretFields = [
233
+ "token",
234
+ "accessToken",
235
+ "apiKey",
236
+ "appSecret",
237
+ "appPassword",
238
+ "signingSecret",
239
+ "channelSecret",
240
+ "secretKey",
241
+ "password",
242
+ "verifyToken"
243
+ ];
244
+ for (const f of secretFields) if (s[f]) s[f] = "●●●●●●●●";
245
+ return s;
246
+ }
247
+ function printSection(label, data) {
248
+ if (!data || Object.keys(data).length === 0) return;
249
+ console.log(chalk.default.bold.white(` ${label}:`));
250
+ for (const [k, v] of Object.entries(data)) if (Array.isArray(v)) console.log(` ${chalk.default.gray(k)}: ${v.join(", ") || "(none)"}`);
251
+ else console.log(` ${chalk.default.gray(k)}: ${v}`);
252
+ console.log();
253
+ }
254
+
255
+ //#endregion
256
+ Object.defineProperty(exports, 'ConfigStore', {
257
+ enumerable: true,
258
+ get: function () {
259
+ return ConfigStore;
260
+ }
261
+ });