@byokit/openclaw 0.2.2 → 0.2.5
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/CHANGELOG.md +17 -0
- package/dist/engine.js +29 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.5 (2026-09-30)
|
|
6
|
+
|
|
7
|
+
- Dependency update: pins @byokit/relay 0.4.2.
|
|
8
|
+
- Dependency update: pins @byokit/link 0.6.0.
|
|
9
|
+
|
|
10
|
+
## 0.2.4 (2026-09-30)
|
|
11
|
+
|
|
12
|
+
- Dependency update: pins @byokit/relay 0.4.1.
|
|
13
|
+
- Dependency update: pins @byokit/link 0.5.1.
|
|
14
|
+
- FIX: (from @byokit/link 0.5.1) Reject an authenticated empty transport frame instead of decoding it as an empty control message.
|
|
15
|
+
|
|
16
|
+
## 0.2.3 (2026-09-30)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- FIX: `prepare()` repairs stale engine manifests and missing or wrong-version dependencies before reusing an installed engine.
|
|
21
|
+
|
|
5
22
|
## 0.2.2 (2026-09-30)
|
|
6
23
|
|
|
7
24
|
- Depends on @byokit/relay 0.4.0.
|
package/dist/engine.js
CHANGED
|
@@ -15,6 +15,34 @@ const putChanged = (path, data) => {
|
|
|
15
15
|
if (!existsSync(path) || readFileSync(path, 'utf8') !== data)
|
|
16
16
|
writeFileSync(path, data, { mode: 0o600 });
|
|
17
17
|
};
|
|
18
|
+
const supports = (list, value) => !list ||
|
|
19
|
+
(!list.includes(`!${value}`) && (list.includes('any') || list.every(item => item.startsWith('!')) || list.includes(value)));
|
|
20
|
+
function installMatches(dir) {
|
|
21
|
+
const manifests = ['package.json', 'package-lock.json'].map(file => ({
|
|
22
|
+
path: join(dir, file), shipped: readFileSync(join(kitDir, 'engine', file)),
|
|
23
|
+
}));
|
|
24
|
+
const lock = JSON.parse(manifests[1].shipped.toString('utf8'));
|
|
25
|
+
// npm omits optional binaries for other platforms (including the other Linux libc).
|
|
26
|
+
const report = process.platform === 'linux' ? process.report.getReport() : undefined;
|
|
27
|
+
const libc = report?.header.glibcVersionRuntime ? 'glibc' : process.platform === 'linux' ? 'musl' : '';
|
|
28
|
+
try {
|
|
29
|
+
if (manifests.some(({ path, shipped }) => !readFileSync(path).equals(shipped)))
|
|
30
|
+
return false;
|
|
31
|
+
for (const [path, pkg] of Object.entries(lock.packages)) {
|
|
32
|
+
if (!path)
|
|
33
|
+
continue; // The root manifest is checked byte for byte above.
|
|
34
|
+
if (pkg.optional && (!supports(pkg.os, process.platform) || !supports(pkg.cpu, process.arch) || !supports(pkg.libc, libc)))
|
|
35
|
+
continue;
|
|
36
|
+
if (JSON.parse(readFileSync(join(dir, path, 'package.json'), 'utf8')).version !== pkg.version)
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// Missing or unreadable manifests and malformed installed package metadata need repair too.
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
18
46
|
export class Engine {
|
|
19
47
|
root;
|
|
20
48
|
bridgeSock;
|
|
@@ -62,8 +90,7 @@ export class Engine {
|
|
|
62
90
|
mkdirSync(d, { recursive: true, mode: 0o700 });
|
|
63
91
|
if (this.o.spawnEngine) {
|
|
64
92
|
const versionPath = join(this.dir, 'node_modules', 'openclaw', 'package.json');
|
|
65
|
-
|
|
66
|
-
if (!existsSync(this.entry) || version !== ENGINE_VERSION) {
|
|
93
|
+
if (!existsSync(this.entry) || !installMatches(this.dir)) {
|
|
67
94
|
this.state('installing');
|
|
68
95
|
rmSync(join(this.dir, 'node_modules'), { recursive: true, force: true });
|
|
69
96
|
for (const f of ['package.json', 'package-lock.json'])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byokit/openclaw",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "The OpenClaw runtime kit: the pinned engine's full operator surface with plain-words helpers for members, sign-in, runs and approvals.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"prepack": "tsc -b && node ../../scripts/fix-words-dts.cjs"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@byokit/link": "0.
|
|
55
|
-
"@byokit/relay": "0.4.
|
|
54
|
+
"@byokit/link": "0.6.0",
|
|
55
|
+
"@byokit/relay": "0.4.2",
|
|
56
56
|
"@byokit/reach": "0.4.0",
|
|
57
57
|
"@byokit/seal": "0.2.0",
|
|
58
58
|
"@openclaw/gateway-client": "2026.8.1",
|