hyperclaw 5.3.2 → 5.3.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 (60) hide show
  1. package/dist/banner-BT9llPVP.js +7 -0
  2. package/dist/banner-CP4LeLsu.js +143 -0
  3. package/dist/banner-D14weGVJ.js +7 -0
  4. package/dist/banner-DNSYi9N-.js +143 -0
  5. package/dist/banner-mu7p6UkV.js +143 -0
  6. package/dist/banner-nRaqjrSN.js +7 -0
  7. package/dist/chat-BTJoZxtU.js +523 -0
  8. package/dist/chat-BYqxftlU.js +523 -0
  9. package/dist/chat-CKLXvJjd.js +545 -0
  10. package/dist/daemon-Bi0rcsh5.js +421 -0
  11. package/dist/daemon-BtQqCfEH.js +7 -0
  12. package/dist/daemon-DnWIgRUn.js +7 -0
  13. package/dist/daemon-WOoAWS-0.js +421 -0
  14. package/dist/engine-BZ44Vuhh.js +7 -0
  15. package/dist/engine-C1osvhmq.js +327 -0
  16. package/dist/engine-C88DJeLD.js +327 -0
  17. package/dist/engine-D9BvbJxu.js +7 -0
  18. package/dist/hyperclawbot-DC3jGsoA.js +516 -0
  19. package/dist/hyperclawbot-DC9nGl99.js +516 -0
  20. package/dist/mcp-loader-BBlqPFQl.js +93 -0
  21. package/dist/mcp-loader-Bd7MNj5-.js +93 -0
  22. package/dist/onboard-BRN9NLFk.js +14 -0
  23. package/dist/onboard-Cxjlal2t.js +14 -0
  24. package/dist/onboard-DRgSPOuY.js +3812 -0
  25. package/dist/onboard-i20xz3_O.js +3812 -0
  26. package/dist/onboard-qPUG8PBU.js +14 -0
  27. package/dist/onboard-x4I788gj.js +3812 -0
  28. package/dist/orchestrator-B9gd0u_r.js +6 -0
  29. package/dist/orchestrator-BURpEF0U.js +6 -0
  30. package/dist/orchestrator-CfswFK1w.js +189 -0
  31. package/dist/orchestrator-CnEDItE1.js +189 -0
  32. package/dist/osint-BXu9NVcF.js +283 -0
  33. package/dist/osint-BiZZ_d-g.js +283 -0
  34. package/dist/osint-D3OoMs9I.js +283 -0
  35. package/dist/osint-chat-BJfbgXwk.js +789 -0
  36. package/dist/osint-chat-CY2ODmY-.js +789 -0
  37. package/dist/osint-chat-DaRWDl3X.js +789 -0
  38. package/dist/run-main.js +186 -82
  39. package/dist/server-CSu5UPl3.js +4 -0
  40. package/dist/server-DBXhcGiq.js +4 -0
  41. package/dist/server-O4Zv8s74.js +1366 -0
  42. package/dist/server-jkSNOitC.js +1366 -0
  43. package/dist/skill-runtime-CdR3YMFp.js +5 -0
  44. package/dist/skill-runtime-CxL0PxyP.js +104 -0
  45. package/dist/skill-runtime-IFk6whV0.js +104 -0
  46. package/dist/skill-runtime-vylCVHmD.js +5 -0
  47. package/dist/src-BA04v4CG.js +458 -0
  48. package/dist/src-BWpeRe8J.js +63 -0
  49. package/dist/src-CboISwpv.js +63 -0
  50. package/dist/src-PutqGezt.js +458 -0
  51. package/dist/sub-agent-tools-DNbBE93o.js +39 -0
  52. package/dist/sub-agent-tools-Dzh0nVzy.js +39 -0
  53. package/dist/update-check-B-wd-tpa.js +7 -0
  54. package/dist/update-check-DlUFL81n.js +118 -0
  55. package/package.json +2 -2
  56. package/static/chat.html +570 -259
  57. package/static/web/assets/index-BhCDgT5S.js +75 -0
  58. package/static/web/assets/index-D2RfO0dG.css +1 -0
  59. package/static/web/icon.png +0 -0
  60. package/static/web/index.html +14 -0
@@ -0,0 +1,118 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ const chalk = require_chunk.__toESM(require("chalk"));
3
+ const fs_extra = require_chunk.__toESM(require("fs-extra"));
4
+ const path = require_chunk.__toESM(require("path"));
5
+ const https = require_chunk.__toESM(require("https"));
6
+
7
+ //#region src/infra/update-check.ts
8
+ const NPM_REGISTRY = "https://registry.npmjs.org";
9
+ const PACKAGE_NAME = "hyperclaw";
10
+ /** Resolve current package version from package.json (works from repo and global install). */
11
+ async function getCurrentVersion() {
12
+ const candidates = [];
13
+ try {
14
+ candidates.push(require.resolve("hyperclaw/package.json"));
15
+ } catch {}
16
+ candidates.push(path.default.resolve(__dirname, "../package.json"));
17
+ candidates.push(path.default.resolve(__dirname, "../../package.json"));
18
+ candidates.push(path.default.resolve(process.cwd(), "package.json"));
19
+ for (const pkgPath of candidates) try {
20
+ const pkg = await fs_extra.default.readJson(pkgPath).catch(() => null);
21
+ const v = pkg?.version;
22
+ if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) return v;
23
+ } catch {}
24
+ return "0.0.0";
25
+ }
26
+ function parseVersion(v) {
27
+ const match = v.replace(/^v/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
28
+ if (!match) return [
29
+ 0,
30
+ 0,
31
+ 0
32
+ ];
33
+ return [
34
+ parseInt(match[1], 10),
35
+ parseInt(match[2], 10),
36
+ parseInt(match[3], 10)
37
+ ];
38
+ }
39
+ function isNewer(latest, current) {
40
+ const a = parseVersion(latest);
41
+ const b = parseVersion(current);
42
+ for (let i = 0; i < 3; i++) {
43
+ if (a[i] > b[i]) return true;
44
+ if (a[i] < b[i]) return false;
45
+ }
46
+ return false;
47
+ }
48
+ async function checkForUpdates(currentVersion) {
49
+ if (process.env.HYPERCLAW_NO_UPDATE_CHECK === "1") return null;
50
+ return new Promise((resolve) => {
51
+ const req = https.default.get(`${NPM_REGISTRY}/${PACKAGE_NAME}/latest`, { timeout: 3e3 }, (res) => {
52
+ let data = "";
53
+ res.on("data", (chunk) => data += chunk);
54
+ res.on("end", () => {
55
+ try {
56
+ const json = JSON.parse(data);
57
+ const latest = json?.version;
58
+ if (!latest || typeof latest !== "string") {
59
+ resolve(null);
60
+ return;
61
+ }
62
+ resolve({
63
+ latest,
64
+ available: isNewer(latest, currentVersion)
65
+ });
66
+ } catch {
67
+ resolve(null);
68
+ }
69
+ });
70
+ });
71
+ req.on("error", () => resolve(null));
72
+ req.on("timeout", () => {
73
+ req.destroy();
74
+ resolve(null);
75
+ });
76
+ });
77
+ }
78
+ function notifyUpdateAvailable(current, latest) {
79
+ console.log(chalk.default.yellow(` 🦅 Update available: ${latest} (you have ${current})`));
80
+ console.log(chalk.default.gray(" Run: npm i -g hyperclaw\n"));
81
+ }
82
+ /** Fire-and-forget: check for updates and notify user if available. Call after banner/startup. */
83
+ function maybeShowUpdateNotice(skipInDaemon = false) {
84
+ if (skipInDaemon) return;
85
+ (async () => {
86
+ try {
87
+ const current = await getCurrentVersion();
88
+ const result = await checkForUpdates(current);
89
+ if (result?.available) notifyUpdateAvailable(current, result.latest);
90
+ } catch {}
91
+ })().catch(() => {});
92
+ }
93
+
94
+ //#endregion
95
+ Object.defineProperty(exports, 'checkForUpdates', {
96
+ enumerable: true,
97
+ get: function () {
98
+ return checkForUpdates;
99
+ }
100
+ });
101
+ Object.defineProperty(exports, 'getCurrentVersion', {
102
+ enumerable: true,
103
+ get: function () {
104
+ return getCurrentVersion;
105
+ }
106
+ });
107
+ Object.defineProperty(exports, 'maybeShowUpdateNotice', {
108
+ enumerable: true,
109
+ get: function () {
110
+ return maybeShowUpdateNotice;
111
+ }
112
+ });
113
+ Object.defineProperty(exports, 'notifyUpdateAvailable', {
114
+ enumerable: true,
115
+ get: function () {
116
+ return notifyUpdateAvailable;
117
+ }
118
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperclaw",
3
- "version": "5.3.2",
3
+ "version": "5.3.4",
4
4
  "description": "⚡ HyperClaw — AI Gateway Platform. The Lobster Evolution 🦅",
5
5
  "main": "dist/run-main.js",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "sdk:build": "tsdown src/sdk/index.ts --outDir dist/sdk --format cjs && tsdown src/sdk/index.ts --outDir dist/sdk --format esm",
41
41
  "core:build": "tsc --noEmit -p packages/core/tsconfig.json",
42
42
  "prepare": "npm run build",
43
- "prepublishOnly": "npm run build && npm run sdk:build && npm run core:build",
43
+ "prepublishOnly": "npm run build && npm run web:build && npm run sdk:build && npm run core:build",
44
44
  "postinstall": "node scripts/postinstall.js",
45
45
  "test": "vitest run",
46
46
  "test:watch": "vitest",