hyperclaw 5.3.3 → 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.
- package/dist/banner-CP4LeLsu.js +143 -0
- package/dist/banner-D14weGVJ.js +7 -0
- package/dist/banner-mu7p6UkV.js +143 -0
- package/dist/banner-nRaqjrSN.js +7 -0
- package/dist/chat-BTJoZxtU.js +523 -0
- package/dist/chat-BYqxftlU.js +523 -0
- package/dist/daemon-BtQqCfEH.js +7 -0
- package/dist/daemon-WOoAWS-0.js +421 -0
- package/dist/engine-C88DJeLD.js +327 -0
- package/dist/engine-D9BvbJxu.js +7 -0
- package/dist/hyperclawbot-DC9nGl99.js +516 -0
- package/dist/mcp-loader-Bd7MNj5-.js +93 -0
- package/dist/onboard-BRN9NLFk.js +14 -0
- package/dist/onboard-Cxjlal2t.js +14 -0
- package/dist/onboard-i20xz3_O.js +3812 -0
- package/dist/onboard-x4I788gj.js +3812 -0
- package/dist/orchestrator-B9gd0u_r.js +6 -0
- package/dist/orchestrator-CfswFK1w.js +189 -0
- package/dist/osint-BXu9NVcF.js +283 -0
- package/dist/osint-D3OoMs9I.js +283 -0
- package/dist/osint-chat-BJfbgXwk.js +789 -0
- package/dist/osint-chat-CY2ODmY-.js +789 -0
- package/dist/run-main.js +130 -41
- package/dist/server-CSu5UPl3.js +4 -0
- package/dist/server-jkSNOitC.js +1366 -0
- package/dist/skill-runtime-CdR3YMFp.js +5 -0
- package/dist/skill-runtime-CxL0PxyP.js +104 -0
- package/dist/src-CboISwpv.js +63 -0
- package/dist/src-PutqGezt.js +458 -0
- package/dist/sub-agent-tools-DNbBE93o.js +39 -0
- package/dist/update-check-B-wd-tpa.js +7 -0
- package/dist/update-check-DlUFL81n.js +118 -0
- package/package.json +2 -2
- package/static/chat.html +2 -2
- package/static/web/assets/index-BhCDgT5S.js +75 -0
- package/static/web/assets/index-D2RfO0dG.css +1 -0
- package/static/web/icon.png +0 -0
- 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.
|
|
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",
|
package/static/chat.html
CHANGED
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
<!-- Banner -->
|
|
294
294
|
<div class="hc-banner">
|
|
295
295
|
<div class="hc-banner-text">HYPERCLAW</div>
|
|
296
|
-
<div class="hc-banner-sub" id="banner-sub">HyperClaw Bot · AI Gateway v5.3.
|
|
296
|
+
<div class="hc-banner-sub" id="banner-sub">HyperClaw Bot · AI Gateway v5.3.4</div>
|
|
297
297
|
</div>
|
|
298
298
|
<div class="welcome" id="welcome">
|
|
299
299
|
<div class="welcome-eagle">🦅</div>
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
if (d.model) {
|
|
755
755
|
document.getElementById('model-hint').textContent = d.model;
|
|
756
756
|
document.getElementById('model-label').textContent = d.model;
|
|
757
|
-
const ver = d.version || '5.3.
|
|
757
|
+
const ver = d.version || '5.3.4';
|
|
758
758
|
document.getElementById('banner-sub').textContent = `HyperClaw Bot \u00b7 AI Gateway v${ver}`;
|
|
759
759
|
}
|
|
760
760
|
document.documentElement.setAttribute('data-daemon', d.daemonMode ? 'true' : 'false');
|