hyperclaw 5.3.0 → 5.3.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.
- package/dist/banner-7G-bEcQg.js +143 -0
- package/dist/banner-DXWl0t8M.js +7 -0
- package/dist/chat-2cf--psT.js +545 -0
- package/dist/daemon-CckV-o_V.js +421 -0
- package/dist/daemon-OqS7Ohda.js +7 -0
- package/dist/engine-BUqmNzOL.js +7 -0
- package/dist/engine-Co38wljj.js +327 -0
- package/dist/hyperclawbot-ukhzbWGk.js +516 -0
- package/dist/mcp-loader-u-tt6BEx.js +93 -0
- package/dist/onboard-D6afaGWd.js +3812 -0
- package/dist/onboard-gr80CpYU.js +14 -0
- package/dist/orchestrator-BwBZ5iON.js +189 -0
- package/dist/orchestrator-CjZos0wH.js +6 -0
- package/dist/osint-B6mHZP10.js +283 -0
- package/dist/osint-chat-DPHec6BB.js +789 -0
- package/dist/run-main.js +30 -30
- package/dist/server-CrZ_WVSf.js +1365 -0
- package/dist/server-zXVY2lfd.js +4 -0
- package/dist/skill-runtime-CxDPbEuj.js +104 -0
- package/dist/skill-runtime-DXEKaHRd.js +5 -0
- package/dist/src-CSriPfaE.js +63 -0
- package/dist/src-CYUaLsXl.js +458 -0
- package/dist/sub-agent-tools-CFlCWrhp.js +39 -0
- package/dist/update-check-CApy4DTc.js +117 -0
- package/dist/update-check-CCMXnjxr.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
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(process.cwd(), "package.json"));
|
|
18
|
+
for (const pkgPath of candidates) try {
|
|
19
|
+
const pkg = await fs_extra.default.readJson(pkgPath).catch(() => null);
|
|
20
|
+
const v = pkg?.version;
|
|
21
|
+
if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) return v;
|
|
22
|
+
} catch {}
|
|
23
|
+
return "0.0.0";
|
|
24
|
+
}
|
|
25
|
+
function parseVersion(v) {
|
|
26
|
+
const match = v.replace(/^v/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
27
|
+
if (!match) return [
|
|
28
|
+
0,
|
|
29
|
+
0,
|
|
30
|
+
0
|
|
31
|
+
];
|
|
32
|
+
return [
|
|
33
|
+
parseInt(match[1], 10),
|
|
34
|
+
parseInt(match[2], 10),
|
|
35
|
+
parseInt(match[3], 10)
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
function isNewer(latest, current) {
|
|
39
|
+
const a = parseVersion(latest);
|
|
40
|
+
const b = parseVersion(current);
|
|
41
|
+
for (let i = 0; i < 3; i++) {
|
|
42
|
+
if (a[i] > b[i]) return true;
|
|
43
|
+
if (a[i] < b[i]) return false;
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
async function checkForUpdates(currentVersion) {
|
|
48
|
+
if (process.env.HYPERCLAW_NO_UPDATE_CHECK === "1") return null;
|
|
49
|
+
return new Promise((resolve) => {
|
|
50
|
+
const req = https.default.get(`${NPM_REGISTRY}/${PACKAGE_NAME}/latest`, { timeout: 3e3 }, (res) => {
|
|
51
|
+
let data = "";
|
|
52
|
+
res.on("data", (chunk) => data += chunk);
|
|
53
|
+
res.on("end", () => {
|
|
54
|
+
try {
|
|
55
|
+
const json = JSON.parse(data);
|
|
56
|
+
const latest = json?.version;
|
|
57
|
+
if (!latest || typeof latest !== "string") {
|
|
58
|
+
resolve(null);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
resolve({
|
|
62
|
+
latest,
|
|
63
|
+
available: isNewer(latest, currentVersion)
|
|
64
|
+
});
|
|
65
|
+
} catch {
|
|
66
|
+
resolve(null);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
req.on("error", () => resolve(null));
|
|
71
|
+
req.on("timeout", () => {
|
|
72
|
+
req.destroy();
|
|
73
|
+
resolve(null);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function notifyUpdateAvailable(current, latest) {
|
|
78
|
+
console.log(chalk.default.yellow(` 🦅 Update available: ${latest} (you have ${current})`));
|
|
79
|
+
console.log(chalk.default.gray(" Run: npm i -g hyperclaw\n"));
|
|
80
|
+
}
|
|
81
|
+
/** Fire-and-forget: check for updates and notify user if available. Call after banner/startup. */
|
|
82
|
+
function maybeShowUpdateNotice(skipInDaemon = false) {
|
|
83
|
+
if (skipInDaemon) return;
|
|
84
|
+
(async () => {
|
|
85
|
+
try {
|
|
86
|
+
const current = await getCurrentVersion();
|
|
87
|
+
const result = await checkForUpdates(current);
|
|
88
|
+
if (result?.available) notifyUpdateAvailable(current, result.latest);
|
|
89
|
+
} catch {}
|
|
90
|
+
})().catch(() => {});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
Object.defineProperty(exports, 'checkForUpdates', {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () {
|
|
97
|
+
return checkForUpdates;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, 'getCurrentVersion', {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () {
|
|
103
|
+
return getCurrentVersion;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, 'maybeShowUpdateNotice', {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () {
|
|
109
|
+
return maybeShowUpdateNotice;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, 'notifyUpdateAvailable', {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return notifyUpdateAvailable;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-jS-bbMI5.js');
|
|
2
|
+
const require_update_check = require('./update-check-CApy4DTc.js');
|
|
3
|
+
|
|
4
|
+
exports.checkForUpdates = require_update_check.checkForUpdates;
|
|
5
|
+
exports.getCurrentVersion = require_update_check.getCurrentVersion;
|
|
6
|
+
exports.maybeShowUpdateNotice = require_update_check.maybeShowUpdateNotice;
|
|
7
|
+
exports.notifyUpdateAvailable = require_update_check.notifyUpdateAvailable;
|